TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
jeevan mummadi
NA
157
0
convert image to bitmap image
Jun 12 2009 5:05 AM
i want to convert image to bitmapimage .
i pass imagesource parameter to below method
imagesource="example.jpg";
but at imagesource.streamsource i getting null value
plz tell me how to convert image to bitmap image
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;
Reply
Answers (
3
)
Combining transforms into TransformGroup
WPF Stackpanel and childrens