Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > Avalon

Vista - Convert BitmapImage to Bitmap?

 
 
Old 05-17-2006   #1 (permalink)
Rhinpoche@star-sw.com


 
 

Convert BitmapImage to Bitmap?

How I can convert from System.Windows.Media.Imaging.BitmapImage(Avalon
bitmap) to System.Drawing.Bitmap (.net Bitmap)?


My System SpecsSystem Spec
Old 05-17-2006   #2 (permalink)
robertwl@nospam.microsoft.com


 
 

re: Convert BitmapImage to Bitmap?

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.

-----Original Message-----
From: Rhinpoche@star-sw.com
Posted At: Wednesday, May 17, 2006 6:43 AM
Posted To: microsoft.public.windows.developer.winfx.avalon
Conversation: Convert BitmapImage to Bitmap?
Subject: Convert BitmapImage to Bitmap?


How I can convert from System.Windows.Media.Imaging.BitmapImage(Avalon
bitmap) to System.Drawing.Bitmap (.net Bitmap)?
My System SpecsSystem Spec
Old 05-18-2006   #3 (permalink)
Rhinpoche@star-sw.com


 
 

Re: Convert BitmapImage to Bitmap?

several reasons

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

My System SpecsSystem Spec
Old 01-07-2009   #4 (permalink)


32bit
 
 

Re: Convert BitmapImage to Bitmap?

ImageSource to Bitmap

MemoryStream mse = newMemoryStream();
System.Windows.Media.Imaging.
BmpBitmapEncoder e = newBmpBitmapEncoder();
e.Frames.Add(
BitmapFrame.Create(imageSource_bitmapSource));
e.Save(mse);

WIC Rocks!
My System SpecsSystem Spec
 

Thread Tools



Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46