A bitmap(BMP) is a raster graphics image file. It is also referred to as a Device Independent Bitmap (DIB).
Questions tagged [bitmapimage]
900 questions
19
votes
4 answers
How to free the memory after the BitmapImage is no longer needed?
First, I load a BitmapImage into the Image control, whice is located on the Window.
Then I work with the Image control and then close the Window.
I do it 2-3 times in a minute and my memory fills up very quickly because the images do not unload from…

AgentFire
- 8,944
- 8
- 43
- 90
18
votes
7 answers
How to put image in a picture box from a byte[] in C#
I've a byte array which contains an image binary data in bitmap format. How do I display it using the PictureBox control in C#?
I went thru a couple of posts listed below but not sure if I need to convert the byte array into something else before…

Kevin
- 515
- 4
- 11
- 22
18
votes
2 answers
How can I display a Progressive JPEG in WPF?
How to display a progressive JPEG as it loads from a web URL? I am trying to display a Google Maps image in a image control in WPF, but I want to keep the advantage of the image being a progressive JPG.
How to load a progressive JPG in WPF?
Image…

Chinmoy
- 1,750
- 2
- 21
- 45
17
votes
4 answers
How to convert Byte[] to BitmapImage
I need help, I have this method to get a BitmapImage from a Byte[]
public BitmapSource ByteToBitmapSource(byte[] image)
{
BitmapImage imageSource = new BitmapImage();
using (MemoryStream stream = new MemoryStream(image))
{
…

fma3
- 571
- 2
- 5
- 10
17
votes
1 answer
How do I save a BitmapImage from memory into a file in WPF C#?
I can't find anything over this and need some help. I have loaded a bunch of images into memory as BitmapImage types, so that I can delete the temp directory that they were stored in. I have successfully done this part. Now I need to save the images…

Chris
- 363
- 1
- 4
- 16
17
votes
3 answers
Inno Setup Invalid Bitmap Image
I'm trying to replace the sidebar image on the start page of my installer. I keep getting the error 'Bitmap image is not valid'. The specs match the default Inno Setup installer sidebar .bmp exactly. The image I'm trying to use has dimensions of 164…

ph1ash
- 371
- 3
- 13
16
votes
2 answers
Convert ImageSource to BitmapImage - WPF
I'm using a class library that generates a large ImageSource, > 3000x3750 pixels. I would like to convert this ImageSource to BitmapImage so that I can take advantage of DecodePixelWidth or DecodePixelHeight instead of resizing it everytime this…
Hans
15
votes
2 answers
C# Windows 8 Store (Metro, WinRT) Byte array to BitmapImage
I am working on a Windows 8 Metro app that applies filters to images. I have a web version of the app and wanted to port it. But as we all know WinRT doesn't have all the good things .NET provides otherwise :/
Currently I am applying the filters on…

mitelinko
- 151
- 1
- 1
- 4
15
votes
1 answer
C# Load JPG file, extract BitmapImage
I am trying to extract a BitmapImage from a JPG. This is the code I have:
FileStream fIn = new FileStream(sourceFileName, FileMode.Open); // source JPG
Bitmap dImg = new Bitmap(fIn);
MemoryStream ms = new MemoryStream();
dImg.Save(ms,…

IamIC
- 17,747
- 20
- 91
- 154
14
votes
1 answer
what library that can be used to convert bitmap to vector?
My current project is related to bitmap to vector. so far i found these libraries:
potrace
(+) really good for line tracing
(+) documentation
(-) does not support image gradient
ardeco
(+) support olor gradient
(+) documentation
(-)…

azer89
- 1,529
- 1
- 15
- 29
13
votes
2 answers
Convert RenderTargetBitmap to BitmapImage
I have a RenderTargetBitmap, I need to convert it to BitmapImage. Please check the code below.
RenderTargetBitmap bitMap = getRenderTargetBitmap();
Image image = new Image();// This is a Image
image.Source = bitMap;
In the above code I have used…

sharmila
- 1,493
- 5
- 23
- 42
12
votes
2 answers
How can I convert WriteableBitmap to BitmapImage?
BitmapImage bitmapImage = new BitmapImage(new Uri("arka_projects_as_logo.png", UriKind.Relative));
Image uiElement = new Image() { Source = bitmapImage };
ScaleTransform t = new ScaleTransform() { ScaleX = 0.2, ScaleY = 0.2 };
WriteableBitmap…

Sergey
- 47,222
- 25
- 87
- 129
12
votes
4 answers
How can I convert byte[] to BitmapImage?
I have a byte[] that represents the raw data of an image. I would like to convert it to a BitmapImage.
I tried several examples I found but I kept getting the following exception
"No imaging component suitable to complete this operation was…

gerstla
- 587
- 1
- 5
- 20
10
votes
3 answers
How to render bitmap into canvas in WPF?
I've subclassed Canvas so that I can override its Render function. I need to know how I can load a bitmap in WPF and render that to the canvas. I'm completely new to WPF and I haven't found any tutorials that show you how to do something so…

void.pointer
- 24,859
- 31
- 132
- 243
10
votes
1 answer
Memory consumption of BitmapImage/Image control in Windows Phone 8
I am testing a WP8 app and it's image viewer to show many images, I found app's memory consumption is raising and want to find out how to solve it.
I've read some articles from web, however the solutions provided by those articles are not working on…

ppcrong
- 218
- 4
- 14