Changing bit depth

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

Changing bit depth

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

Hello,

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;
cmd.SetPalette(null);

Thanks
Frédéric

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

Re: Changing bit depth

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

Frédéric,

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: https://www.gdpicture.com/guides/gdpicture/web ... 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.

https://www.gdpicture.com/guides/gdpicture/GdP ... 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.

https://www.gdpicture.com/guides/gdpicture/GdP ... toBGR.html

Regards,

David

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 1 guest