Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Convert BitmapImage to Bitmap?

171 views
Skip to first unread message

Rhin...@star-sw.com

unread,
May 17, 2006, 9:42:31 AM5/17/06
to
How I can convert from System.Windows.Media.Imaging.BitmapImage(Avalon
bitmap) to System.Drawing.Bitmap (.net Bitmap)?

Rhin...@star-sw.com

unread,
May 17, 2006, 9:42:34 AM5/17/06
to

robe...@nospam.microsoft.com

unread,
May 17, 2006, 12:13:02 PM5/17/06
to
Just curious, why are you trying to do that? Perhaps there are WPF classes that can do what you're looking for?

In any case, WPF doe not have a way to natively convert BitmapSources to Bitmaps. You need to manually do this by calling CopyPixels, and creating a Bitmap with the image bits.

Rhin...@star-sw.com

unread,
May 18, 2006, 3:27:17 AM5/18/06
to
several reasons :)

1.relatively large library of very specific image transformations,
implemented on Bitmap
2.Hard deadline
3.cherish hopes for some backward compatibilty :))

matchpointn

unread,
Jan 7, 2009, 2:34:53 PM1/7/09
to

imagesource to bitmap

memorystream mse = new memorystream();
system.windows.media.imaging.bmpbitmapencoder e = new
bmpbitmapencoder();
e.frames.add(bitmapframe.create(imagesource_bitmapsource));
e.save(mse);

wic rocks!


--
matchpointn

0 new messages