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
4
votes
1 answer

WPF BitmapImage Width/Height are always 1?

I don't understand... BitmapImage img = new BitmapImage(myUri); Console.WriteLine("Width: {0}, Height: {1}", img.Width, img.Height); Output: "Width: 1, Height: 1". I've tried PixelWidth/PixelHeight, I've tried manually creating it with…
Domenic
  • 110,262
  • 41
  • 219
  • 271
4
votes
4 answers

How to save an image to Internal Storage and then show it on another activity?

I am working in Xamarin.Android. I have two activities on which I need to show the same image. On the first screen, I download it from a web URL and show it but I don't want to do the same on second screen. I want to save it to Internal Storage when…
Ahmed Salman Tahir
  • 1,783
  • 1
  • 17
  • 26
4
votes
1 answer

When does the .NET FW BitmapImage class download/cache?

I am a little confused as to this class, I was hoping someone could shed some light. I know that when it downloads depends on the BitmapCreateOptions of the image. However, when you create an absolute BitmapImage, say: var Image = new…
Francisco Aguilera
  • 3,099
  • 6
  • 31
  • 57
4
votes
1 answer

Update BitmapImage every second flickers

I am trying to update an image by setting the source property every second, this works however causes a flicker when updated. CurrentAlbumArt = new BitmapImage(); CurrentAlbumArt.BeginInit(); CurrentAlbumArt.UriSource = new Uri((currentDevice as…
bl4kh4k
  • 1,440
  • 4
  • 20
  • 34
4
votes
3 answers

OutOfMemoryException occurs on WriteableBitmap

I am developing one windows phone application which useful for upload images to web server. I am selecting all images from my device into one List object. I am converting all bitmap image to byte[] one by one. My code public byte[]…
Ajay
  • 6,418
  • 18
  • 79
  • 130
4
votes
2 answers

Bind image control to BitmapImage in my class

Whenever I wanted to display an image in the past, I bound the image path to the image's source property. Too easy. Now I want to change the image and always show the image with the latest changes. The change image is saved in a BitmapImage…
Peter
  • 249
  • 3
  • 11
4
votes
4 answers

BitmapImage.ImageOpened Not Firing

I am trying to download an image and have an event fire when it finishes. I use this: BitmapImage btest = new BitmapImage(new Uri("http://www.google.com/images/srpr/logo4w.png")); btest.ImageOpened += btest_ImageOpened; void…
msbg
  • 4,852
  • 11
  • 44
  • 73
4
votes
2 answers

BitmapImage from file PixelFormat is always bgr32

I am loading an image from file with this code: BitmapImage BitmapImg = null; BitmapImg = new BitmapImage(); BitmapImg.BeginInit(); BitmapImg.UriSource = new Uri(imagePath); BitmapImg.CacheOption = BitmapCacheOption.OnLoad; BitmapImg.CreateOptions =…
tabina
  • 1,095
  • 1
  • 14
  • 37
4
votes
2 answers

Convert DrawingImage to BitmapImage

I want to draw large number of shapes (lines, ellipses and ...) and then save them as bitmap or png. I made the drawings and the question is: how can I convert a DrawingImage to BitmapImage in C#? the code is something like this: DrawingGroup…
Hossein Narimani Rad
  • 31,361
  • 18
  • 86
  • 116
4
votes
1 answer

System.UnauthorizedAccessException when saving image from Scheduled Agent

I'm building a WP8 application that changes the background of the lockscreen using images from the Internet. I followed the tutorials over Scheduled Agents and Lockscreen, but I have a problem. When I try to download the new background image from…
4
votes
2 answers

how to compress Uri image to bitmap

this code show me an error i want to add selected image save to database and retrive i follow this 2 tutorials http://nizaqatali.wordpress.com/2011/06/21/android-dialog-select-image-from-gallery/ and this …
Smart Guy
  • 107
  • 1
  • 4
  • 9
4
votes
2 answers

How to render a control to an image?

I want to render a grid as an image to use on a live tile in my Windows 8 Metro Style App.
msbg
  • 4,852
  • 11
  • 44
  • 73
4
votes
1 answer

Convert an XAML file to a BitmapImage

I want to create a BitmapImage with a desired resolution from an XAML (text) file. how can I do that? thanks.
anton
  • 133
  • 1
  • 14
4
votes
2 answers

How can I convert BitmapImage to Icon?

In my application I have to send a List to my shell extension in WCF. These MenuItems are composed of an icon and a label. The type of the icon is System.Drawing.Icon but I have to work from System.Windows.Media.Imaging.BitmapImage. Is…
Akhilleus
  • 305
  • 4
  • 11
3
votes
1 answer

BitmapSource as source to Image Control

I have this BitmapSource source = System.Windows.Interop.Imaging.CreateBitmapSourceFromHBitmap(bitmap.GetHbitmap(), IntPtr.Zero, Int32Rect.Empty, BitmapSizeOptions.FromEmptyOptions()); How I can use it to apply as source for WPF Image…
NoWar
  • 36,338
  • 80
  • 323
  • 498