bpp

How to convert an 8-bit OpenCV IplImage* to a 32-bit IplImage*?

I need to convert an 8-bit IplImage to a 32-bits IplImage. Using documentation from all over the web I've tried the following things: // general code img2 = cvCreateImage(cvSize(img->width, img->height), 32, 3); int height = img->height; int width = img->width; int channels = img->nChannels; int step1 = img->widthStep; int s...

How to initialize 48bpp bitmaps from RGB?

I'm writing an interpreter in managed C++ for, among other things, the PPM image format. The image spec allows for images with up to two bytes per pixel per channel, or 48 bit per pixel color images. I'm attempting to read this format and convert it to a .Net bitmap, but im having trouble getting it working. When I have 24 bit per pix...

how to get Bitsperpixel from a bitmap

Hi, I have a 3rd party component which requires me to give it the bitsperpixel from a bitmap. whats the best way to get "bits per pixel"? I have a c# windows app and my starting point is the following blank method:- public int GetBitsPerPixelMethod( system.drawing.bitmap bitmap ) { //return BitsPerPixel; } At the momement I don...

Reduce bit-depth of PNG files from the command line

What command or series of commands could I execute from the CLI to recursively traverse a directory tree and reduce the bit-depth of all PNG files within that tree from 24bpp to 16bpp? Commands should preserve the alpha layer and should not increase the file size of the PNGs - in fact a decrease would be preferable. I have an OSX based...

32 bit depth jpg images problem in IE when referenced locally

We have an webbapplication that takes an image that will be uploaded and resized. The resize-library we used saved all pictures with 32-bit depth whatever the depth was before. We have an online client that can view the pictures via an html-file and all is fine there. All pictures are shown correctly. The problem: We also have an vb-wi...

How to convert a byte array of 19200 bytes in size where each byte represents 4 pixels (2 bits per pixel) to a bitmap arranged as 320x240 characters.

I am communicating with an instrument (remote controlling it) and one of the things I need to do is to draw the instrument screen. In order to get the screen I issue a command and the instrument replies with an array of bytes that represents the screen. Below is what the instrument manual has to say about converting the response to t...