I'm developing a set of applications for use creating games in XNA. Using Graphics.drawImage I can easily draw a preview image from an XNA texture2D object.
Each object, eg Character, Map etc, is made up of a List of parts, each part storing information such as position rotation and texture source. The next step is to render a preview o...
I have an array of ushort pixel data (16-bit grayscale values), and I am trying to save it as a jpeg image. However my code is crashing at the Save command with "A generic error occurred in GDI+". I can't figure out how to fix this. The directory I am saving to is created by my application and I write other files to it; so I know it's no...
Hi all,
I am currently trying to read in video frames by using FFMPEG. The format is PIX_FMT_RGB24; For each frame, the RGB values are all combined together in frame->data[0] (Where frame is of the type AVFrame).
How do I extract the individual R, G and B values for each frame? This is for processing the video. I would think it would ...
Using C++ and .net I have a stream of data I want to display as a scrolling image. Each time I get some new data I want to add it as a new row (128x1 pixels) and scroll the previous contents to one side.
My first stab at the problem involved rendering the entire data set each time I got a new row. This worked, but was far too slow, so I...
I'm porting a software that build from 16bit color depth to 18bit color depth. How can I convert the 16-bit colors to 18-bit colors? Thanks.
...
Hi
I have C# winForm application which holds a pictureBox control.
This control has a Paint event.Every time paint event is fired , a Bitmap is dynamically created and I perform some drawing on it.
And when user clicks "save" button , edited image is saved as jpg file. It's OK until now.
But when I load a new image in pictureBox contr...
Hello
I have a cannon digital camera and I set it to take pictures with superfine quality and it outputs a .jpg file 3 mega in size.
If I load it like this in ASP.NET(this is useful to change it's dpi resolution or crop it or whaterver)
imgPicture = Image.FromFile(Config.WorkDirectory + this.TempPhotoName);
bmpPicture = new Bitmap(img...
I have a Bitmap that I want to enlarge programatically to ~1.5x or 2x to its original size. Is there an easy way to do that under .NET CF 2.0?
...
I'm looking for recommendations for a programmer's image editor for OSX. I'm looking for something for preparing images for use in software and web applications - I'm not a graphic designer. On Windows I'd use Paint.NET. GIMP is not the answer (flakey and a disaster with Spaces)
Must haves
crop, resize canvas etc
resample, bicubic ...
Hello,
This is my first post here. I have a problem.
I need to take a sceenshot of the desktop, convert it to jpeg, store it in a buffer and then manipulate it and send it over the internet.
I have written the code for doing this with GetDC....and GDI+ for converting the HBITMAP to jpeg. The problem I am having now is that I don't know...
How do i generate an image and draw it in C#?
I am generating an image then allowing the user to further modify it by clicking the imagebox.
This is an editor so i shouldn't need any directX? whats the easiest way to generate a bitmap and draw it to screen?
...
I found this example and used it http://stackoverflow.com/questions/1082884/how-do-you-resize-a-bitmap-under-net-cf-2-0/1082890#1082890
However my image looks horrible because of anti aliasing. It no longer looks pixelated as it should. How do i disable anti aliasing?
...
Hello
I have an image data in a buffer(type - long) from a scanner which is 32 bit.
For example, buffer[0]'s corresponding pixel value is 952 which is [184, 3, 0, 0] <-[R,G,B,A];
I want to display/Paint/draw on to the screen; I am confused when i tried to read about displying bitmaps. I looked at win32 functions, CBitmap class, wi...
Hi there,
I have an image uploader and cropper which creates thumbnails and I occasionally get an Out Of Memory exception on the following line:
Dim bm As Bitmap = System.Drawing.Image.FromFile(imageFile)
The occurance of the error is tiny and very rare, but I always like to know what might be causing it. The imageFile variable is ju...
Consider a Button composed of many graphical elements (and Path) drawn on Canvas. Why is it better to use the Path and other elements to build an image in that Button than assigning a custom Bitmap to it?
I know one advantage, "the path is a vector image". But if I'm not planning to zoom, why should I use it in place of my custom .png,...
I've been working on testing a few things out using SFML 1.4 (Simple and Fast Multimedia Library) with C++ and Visual C++ 2008 Express Edition. To avoid having external images with my graphical programs, I was testing out the sf::Image::LoadFromMemory(const char * Data, std::size_t SizeInBytes) function with Bitmap resources loaded usin...
At a minimum, what I'd like is to have "hg merge" open up the conflicting versions in side by side instances of, say, MS Paint (ugh), so I can do the merging manually. Bonus points for tool suggestions other than MS Paint. At the moment I'm looking at Araxis Merge.
...
Given a monochrome bitmap:
000000000000000000000000000000000000000
001000100000000000000000000000000000000
000101000000000000000000000000000000000
000010000000001000000000000000000000000
000101000000010100000000000000000000000
001000100000100010000000000000000000000
000000000000010100000000000000000000000
000000000000001000000000000000...
I am writting code in c++, gdi+.
I make use of Image's GetThumbnail() method to get thumbnail.
However, I need to convert it into HBITMAP.
I know the following code can get GetHBITMAP:
Bitmap* img;
HBITMAP temp;
Color color;
img->GetHBITMAP(color, &temp); // if img is Bitmap* this works well。
But how can I convert Image* into Bitm...
I need to create a Bitmap object using raw bytes representing monochrome bitmap data. On the full framework, I am doing the following:
Bitmap bmp = new Bitmap(width, height, PixelFormat.Format8bppIndexed)
BitmapData bmpData = bmp.LockBits(new Rectangle(0, 0, bmp.Width, bmp.Height), ImageLockMode.WriteOnly, bmp.PixelFormat);
// Write my...