15,897,371 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by gaurav786mishra (Top 10 by date)
gaurav786mishra
5-Sep-13 10:30am
View
Hi ,Vamshi(Krish)
The above code gives error :Buffer size is not sufficient.
public static BitmapImage ByteToImage(byte[] imageData)
{
byte[] buffer = imageData;
var width = 100; // for example
var height = 100; // for example
var dpiX = 96d;
var dpiY = 96d;
var pixelFormat = PixelFormats.Pbgra32; // for example
var bytesPerPixel = (pixelFormat.BitsPerPixel + 7) * 8;
var stride = bytesPerPixel * width;
var bitmap = BitmapSource.Create(width, height, dpiX, dpiY,
pixelFormat, null, buffer, stride);
return (BitmapImage)bitmap;
}
gaurav786mishra
5-Sep-13 4:22am
View
Ok Thank you for ur reply.Actually rawdata is a byte array which contains the bytes in array format coming from database.I am getting the rawdata array filled with numbers on each index of array.
I guess the problem is i am converting path to byte array and saving in database..If that i am doing..then how can i extract image from image path as wpf has no file upload control?
gaurav786mishra
5-Sep-13 3:06am
View
From the open file dialog box image is selected and that path is kept in txtBrowseFile.Text further from text box it is used in :
private void fillbitmap()
{
#region load image with StreamSrouce
bitmapImage = new BitmapImage();
bitmapImage.BeginInit();
bitmapImage.StreamSource = System.IO.File.OpenRead(txtBrowseFile.Text);
bitmapImage.EndInit();
//now, the Position of the StreamSource is not in the begin of the stream.
image1.Source = bitmapImage;
#endregion
}
The bitmap generated from here is then used in passed to :
public Byte[] BufferFromImage(BitmapImage imageSource)
{
Stream stream = imageSource.StreamSource;
Byte[] buffer = null;
if (stream != null && stream.Length > 0)
{
using (BinaryReader br = new BinaryReader(stream))
{
buffer = br.ReadBytes((Int32)stream.Length);
}
}
return buffer;
}
which returns a byte array and then that byte array is stored in database.
gaurav786mishra
4-Jun-13 8:20am
View
Thanks PrissySC for the reply.Did u get the SDK made for WPF application or got sdk for windows application and u are making it work for wpf.
Actualy i need to make all the biometric integration like fingerprint,iris,facial ,signature ,and voice in wpf application.BUt only fingerprint for a browser application ,
and i got its sdk of windows form..
.should i ask client for wpf sdk..or wpf (xbab) sdk or silverlight (sdk)?Or else i need to use only the sdk provided to me..(i.e. windows)and struggle with it to convert in wpf or silverlight
gaurav786mishra
20-May-13 3:52am
View
But its working fine in windows and wpf application.So they says that its working fine.i need to make it work in silverlight
gaurav786mishra
17-May-13 9:52am
View
Thanks .But there is no help from support of lumidigm
gaurav786mishra
25-Jul-12 6:11am
View
Yup idle 63 ...it worked thank you..
gaurav786mishra
5-Jun-12 7:28am
View
i want last ten distinct User_No
gaurav786mishra
30-Jan-12 6:46am
View
Thanx a lot
gaurav786mishra
30-Nov-11 6:52am
View
exactly this is what i want thank you.can someone help???
Show More