Changing bit depth

Discussions about image processing and document imaging.
Post Reply
Posts: 14
Joined: Thu Dec 25, 2014 7:25 pm

Changing bit depth

Post by fnaudeau » Tue Aug 02, 2016 2:30 pm


I looking for an equivalent of LeadTools command "ColorResolutionCommand".
This function is used to change the bits per pixel of an image.
Is it possible with GDPicture ?

Here is the LeadTools call:

ColorResolutionCommand cmd = new ColorResolutionCommand();
cmd.Mode = ColorResolutionCommandMode.InPlace;
cmd.BitsPerPixel = 24;
cmd.Order = RasterByteOrder.Bgr;
cmd.DitheringMethod = RasterDitheringMethod.None;
cmd.PaletteFlags = ColorResolutionCommandPaletteFlags.None;


Posts: 66
Joined: Mon Feb 08, 2016 3:12 pm

Re: Changing bit depth

Post by David » Mon Aug 08, 2016 11:58 am


Although the API is different than our beloved competitor, GdPicture.NET is obviously able to achieve such conversion.

You will see a number of methods related to this topic listed there: ... mbers.html

For instance the ConvertTo24BppRGB method converts a GdPicture image to a 24-bits color image. 8 bits each are used for the red, green, and blue components. ... ppRGB.html

In case you need BGR, the SwapColorsRGBtoBGR method swaps the color components (RGB - > BGR) of a GdPicture image or of an area of a GdPicture image defined by SetROI() method. ... toBGR.html



Post Reply

Who is online

Users browsing this forum: Google [Bot] and 5 guests