Linked Questions
19 questions linked to/from Is there a good way to convert between BitmapSource and Bitmap?
0 votes
1 answer
1k views
How to convert Bitmap SharpDX [duplicate]
How to convert System.Windows.Media.Imaging.BitmapSource to Bitmap for SharpDX?
0 votes
0 answers
76 views
Convert ImageSource to Bitmap [duplicate]
Here is what i have so far OpenFileDialog dialog = new OpenFileDialog { CheckFileExists = true, Multiselect = false, Filter = "Images (*.jpg,*.png)|*....
240 votes
10 answers
250k views
Load a WPF BitmapImage from a System.Drawing.Bitmap
I have an instance of a System.Drawing.Bitmap and would like to make it available to my WPF app in the form of a System.Windows.Media.Imaging.BitmapImage. What would be the best approach for this?
76 votes
4 answers
135k views
Using Image control in WPF to display System.Drawing.Bitmap
How do I assign an in-memory Bitmap object to an Image control in WPF ?
53 votes
6 answers
34k views
WPF CreateBitmapSourceFromHBitmap() memory leak
I need to draw an image pixel by pixel and display it inside a WPF. I am attempting to do this by using a System.Drawing.Bitmap then using CreateBitmapSourceFromHBitmap() to create a BitmapSource for ...
32 votes
2 answers
42k views
Convert System.Windows.Media.Imaging.BitmapSource to System.Drawing.Image
I'm tying together two libraries. One only gives output of type System.Windows.Media.Imaging.BitmapSource, the other only accepts input of type System.Drawing.Image. How can this conversion be ...
10 votes
3 answers
5k views
DrawingContext to Bitmap file
I have a DrawingContext (part of a Visual or a DrawingGroup), where I draw a bunch of rectangles and/or 1-bit images on top of each other. Think of it as a masking 1-bit image. I would like to convert ...
4 votes
0 answers
6k views
Get color depth of a Bitmap
I want to get the bit depth (and color space) of an image file with c#. Here are my testfiles. Using the properties of the windows explorer, I verified their bit depths (8, 16, 24, 48, 96). ...
3 votes
3 answers
1k views
Is there any IconBitmapEncoder in WPF?
I am creating images in various formats in WPF using BitmapEncoder. For example, to create a png image from a FrameworkElement, i am using the following code, BitmapEncoder imgEncoder = new ...
0 votes
2 answers
2k views
Get file Thumbnail image with transparency
I want to get file's thumbnail with transparency. I have the following code to achieve it: BitmapImage GetThumbnail(string filePath) { ShellFile shellFile = ShellFile.FromFilePath(filePath); ...
1 vote
1 answer
2k views
Get BitmapSource From Image Control
why the following code is returning null for btmSrc ? DrawingImage drawingElement =(DrawingImage)System.Windows.Application.Current.TryFindResource(name); System.Windows.Controls.Image image = new ...
-1 votes
1 answer
2k views
Recording RGB stream from the kinect sensor
I'm doing a WPF application and one of the functions is to record video (Only RGB stream) from Kinect sensor (using Aforge and SDK 1.5). In my application, i have a button that when clicked, it ...
3 votes
0 answers
2k views
How to fast convert BitmapSource to Bitmap?
Can anyone suggest a way to convert a 2352x1726x8bit greyscale BitmapSource to Bitmap that is faster than the following taking about 600ms on a 3.2GHz P4: public static Bitmap toBitmap(this ...
1 vote
2 answers
2k views
Trouble using Kinect ColorImageFrame with Emgu CV
I'm working on a project for school involving C#, Kinect, and Emgu CV. I fairly new to both C# and Emgu CV, so I may be missing something simple. What I am trying to do is use the image from the ...
1 vote
1 answer
922 views
How can I get a bitmap from the clipboard to show in a WPF list control
I have an image in a the clipboard ( a bitmap ) which I am pulling from the clipboard as follows datObj = Clipboard.GetDataObject(); InteropBitmap pdfBitmap = datObj.GetData(DataFormats....