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

crop image without copying

I'm writing an application that requires me to split a large image into small tiles, where each tile is essentially a cropped version of the original image. Currently my split operation looks something like this tile.Image = new…
phosphoer
  • 433
  • 6
  • 16
5
votes
1 answer

Creating Bitmap Object from raw bytes

I am trying to create a bitmap object from raw bytes, my PixelFormat is RGB with 8 bits per sample, which is 3 bytes per pixel. now for this my stide will be 3 times the width. But Bitmap class is always looking for multiplier of 4 for stride value.…
user1935868
  • 95
  • 1
  • 5
5
votes
2 answers

Automatic Adjustment of brightness, contrast and sharpness of a bitmap image

As the title itself suggest everything ... I have to first automatically adjust contrast , brightness and sharpness then if required I have to provide manual adjustment seekbars. Is there any library available for automatic adjustment?
Pie
  • 262
  • 2
  • 10
5
votes
1 answer

How can I merge 2 images on Windows Phone

I have 2 images and I want to merge them into one on my apps in Windows Phone. The first image captured by my WP's camera, the second image is a frame (borders, filter, etc.) which user can choose among our templates. So how can I merge them into…
Cong Tran
  • 1,448
  • 14
  • 30
4
votes
1 answer

ASP.NET Throws Win32Exception when creating BitmapImage, cannot find file specified

I have been developing a book viewing website that takes rather large images (upwards of 77+ megapixels) and scales them down before serving the image. It basically does the following algorithm: If the requested book has already been cached, serve…
Ski
  • 1,182
  • 1
  • 9
  • 20
4
votes
2 answers

why use BeginInit() with simple BitmapImages?

I have seen a lot of these on the web: var b = new BitmapImage(); b.BeginInit(); b.UriSource = new Uri(myPath, UriKind.RelativeOrAbsolute); b.EndInit(); myImage.Source = b; now, as far as I'm concerned, I would first have gone for the more compact…
David
  • 6,014
  • 4
  • 39
  • 55
4
votes
1 answer

Loading BitmapImage in code

From my assembly (A) I want to call a method in another assembly (B) which passes an image. This image is then shown in a WPF Window - the window is part of B's project. I can't seem to pass an ImageSource with a pack:// uri as this gets evaluated…
Paul
4
votes
2 answers

Rendering WPF Visual Object as Image Yields Solid Black Image

In a C#/WPF application, I have a DataChart object that I need to save to an image. Currently, the object is added to a Fixed Document and correctly displays on that Fixed Document by using the following code: VisualBrush chartBrush = new…
JToland
  • 3,630
  • 12
  • 49
  • 70
4
votes
2 answers

WPF BitmapImage Memory Usage

I am trying to convert a byte array of an image to BitmapImage to bind to a button. public static BitmapImage GetBitmapImageFromByteArray(byte[] p_Image) { try { BitmapImage bmpImage; if (p_Image != null) …
user296623
  • 325
  • 3
  • 7
  • 18
4
votes
1 answer

System.Drawing.Graphics Drawimage rotates picture taken from IOS to 90 degree

I have the following code which gets an image uploaded and draws it in 150 by 200 div using System.Drawing.Graphics but when the image is taken from IOS device the picture is rotated to 90 degree right. FYI: I had the same issue drawing the image…
Helen Araya
  • 1,886
  • 3
  • 28
  • 54
4
votes
1 answer

Button click go into infinite loop (ASP.Net)

I am taking a image from a particular path and apply color on it then i want to save the image and display it back on button click. but that click event go into infinite loop. It do not cause loop some time but if you run project more than one …
brijrajsinh
  • 453
  • 3
  • 11
4
votes
1 answer

WPF BitmapImage Serialization/Deserialization

I've been trying to Serialize and Deserialize BitmapImages. I've been using methods which supposedly works which I found in this thread: error in my byte[] to WPF BitmapImage conversion? Just to iterate what is going on, here is part of my…
hillsprig
  • 307
  • 5
  • 12
4
votes
1 answer

Dynamically crop a BitmapImage object

I have a BitmapImage object that contains an image of 600 X 400 dimensions. Now from my C# code behind, I need to create two new BitmapImage objects, say objA and objB of dimensions 600 X 200 each such that objA contains the upper half cropped image…
rohits
  • 974
  • 1
  • 8
  • 12
4
votes
4 answers

UWP BitmapImage SetSource from MemoryStream hangs

In my UWP app i store images in an SQLite db in form of byte[]. Then as i retrieve my objects from the db i bind them to a GridView data template which has an Image control. As i cant bind the Image's Source directly to the array, so i have created…
Mike Tsayper
  • 1,686
  • 1
  • 17
  • 25
4
votes
2 answers

C# Windows phone page background isn't set

I want to set a page background to an image that i download from web, and it works only in designer view. But when i start the app in emulator or on device it just doesn't work(it doesn't get downloaded and set). Mainfest is set to require internet…
Twarei
  • 84
  • 4