Questions tagged [bitmapimage]

A bitmap(BMP) is a raster graphics image file. It is also referred to as a Device Independent Bitmap (DIB).

900 questions
181
votes
6 answers

Does SVG support embedding of bitmap images?

Is an SVG image purely vectorial or can we combine bitmap images into an SVG image ? How about transforms applied on the bitmap images (perspective, mappings, etc.) ? Edit: Images may be included in an SVG by link reference. See…
chmike
  • 20,922
  • 21
  • 83
  • 106
67
votes
2 answers

How to store(bitmap image) and retrieve image from sqlite database in android?

In my project I need to store an image into a sqlite database and also need to retrieve it to show in my android emulator. When I show it directly after decoding the encoded string, which I got from Java class using sockets, the image displays…
Rahul Gautam
  • 1,121
  • 3
  • 11
  • 18
42
votes
5 answers

BitmapImage to byte[]

I have a BitmapImage that I'm using in a WPF application, I later want to save it to a database as a byte array (I guess it's the best way), how can I perform this conversion? Or, alternatively, is there a better way to save a BitmapImage (or any of…
SoManyGoblins
  • 5,605
  • 8
  • 45
  • 65
38
votes
1 answer

How can I get a BitmapImage from a Resource?

My assembly includes an image with BuildAction==Resource. I want to obtain a BitmapImage from this embedded resource. I can load a BitmapImage from file like this: var bitmap = new BitmapImage(new Uri(path)); But how to I create a Uri that will…
mackenir
  • 10,801
  • 16
  • 68
  • 100
37
votes
2 answers

convert array of bytes to bitmapimage

I'm going to convert array of bytes to System.Windows.Media.Imaging.BitmapImage and show the BitmapImage in an image control. When I'm using the first code, noting happens! no error and no image is displayed. But when I'm using the second one it…
Hossein Narimani Rad
  • 31,361
  • 18
  • 86
  • 116
36
votes
3 answers

Reduce the size of a bitmap to a specified size in Android

I want to reduce the size of a bitmap to 200kb exactly. I get an image from the sdcard, compress it and save it to the sdcard again with a different name into a different directory. Compression works fine (3 mb like image is compressed to around 100…
TharakaNirmana
  • 10,237
  • 8
  • 50
  • 69
32
votes
2 answers

Creating WPF BitmapImage from MemoryStream png, gif

I am having some trouble creating a BitmapImage from a MemoryStream from png and gif bytes obtained from a web request. The bytes seem to be downloaded fine and the BitmapImage object is created without issue however the image is not actually…
Simon Fox
  • 10,409
  • 7
  • 60
  • 81
31
votes
3 answers

Read bitmap file into structure

I would like to read a bitmap file into a struct and manipulate it like eg. making a mirror effect, but I cannot understand which kind of struct should I be creating in order to read into it. Thank you for your help.
Ege
  • 941
  • 4
  • 17
  • 36
30
votes
1 answer

XAML bind BitmapImage ViewModel property

I have problem with update listbox from view model class. I use Caliburn Micro framework. My scenario is here: I bind property of type bindableCollection on listbox: Code from view model: private BindableCollection _friends; public…
user572844
24
votes
1 answer

C# copy paste an image region into another image

I am trying to write an utility class that permits automatic resizing of images that are tilebale. Let's say there is a srcBitmap from where I copy a region given by a Rectangle srcRegion. I then want to paste (pixel information wise) that region…
teodron
  • 1,410
  • 1
  • 20
  • 41
22
votes
2 answers

Save BitmapImage to File

I am working on a program that downloads images from a URL to a bitmapimageand displays it. Next I try to save the bitmapimage to the harddrive using jpegbitmapencoder. The file is successfully created but the actual jpeg image is empty or 1 black…
Ben Unsworth
  • 223
  • 1
  • 2
  • 5
22
votes
5 answers

Save HBITMAP to *.bmp file using only Win32

I have a HBITMAP in my pure Win32 project (no external libraries are used). Can I export it to a *.bmp file using only Winapi and/or CRT functions so I don't have to add dependencies to the project?
sashoalm
  • 75,001
  • 122
  • 434
  • 781
22
votes
3 answers

How to Change Pixel Color of an Image in C#.NET

I am working with Images in Java, I have designed more over 100+ images(.png) format, They were all Trasparent and Black Color Drawing. The problem is, Now I have been asked to change the color of the Drawing (Black -to ). I have searched many code…
Bibi Tahira
  • 1,082
  • 5
  • 15
  • 39
21
votes
2 answers

BitmapSource to BitmapImage

I need to parse the content of Clipboard.GetImage() (a BitmapSource) to a BitmapImage. Does anyone knows how can this be done?
Jaime Oro
  • 9,899
  • 8
  • 31
  • 39
20
votes
4 answers

BitmapImage in WPF does lock file

I use: Dim bmi As New BitmapImage(New Uri(fiInfo.FullName, UriKind.Absolute)) bmi.CacheOption = BitmapCacheOption.OnLoad this does not Use OnLoad And file still is locked to overwrite on harddisk. Any idea how to unlock? Regards
Nasenbaer
  • 4,810
  • 11
  • 53
  • 86
1
2 3
59 60