oferz
asked on
Convert image from 24 BPP to 8 BPP
Hello experts,
I have a Grayscale 24 BPP, I need to save it as 8 BPP for other application that are using 8 BPP.
Does someone here have a sample code or can direct me to solving this issue?
Thanks in advance,
Ofer
I have a Grayscale 24 BPP, I need to save it as 8 BPP for other application that are using 8 BPP.
Does someone here have a sample code or can direct me to solving this issue?
Thanks in advance,
Ofer
Hi Ofer,
You can do this with a command line call to the excellent (and free!) GraphicsMagick software. This EE article explains how to download and install it:
https://www.experts-exchange.com/articles/18119/Reduce-the-file-size-of-many-JPG-files-in-many-folders-via-an-automated-mass-batch-compression-method.html
The command line you need is this:
gm.exe convert -depth 8 input.jpg output.jpg
Of course, the file types don't have to be JPG. Here's the doc on convert:
http://www.graphicsmagick.org/convert.html
And here's the doc on -depth:
http://www.graphicsmagick.org/GraphicsMagick.html#details-depth
I see that two of your Topics are C# and Visual Basic.NET, which is fine. You may utilize <gm.exe> from any programming/scripting language that allows you to invoke a command line call. Regards, Joe
You can do this with a command line call to the excellent (and free!) GraphicsMagick software. This EE article explains how to download and install it:
https://www.experts-exchange.com/articles/18119/Reduce-the-file-size-of-many-JPG-files-in-many-folders-via-an-automated-mass-batch-compression-method.html
The command line you need is this:
gm.exe convert -depth 8 input.jpg output.jpg
Of course, the file types don't have to be JPG. Here's the doc on convert:
http://www.graphicsmagick.org/convert.html
And here's the doc on -depth:
http://www.graphicsmagick.org/GraphicsMagick.html#details-depth
I see that two of your Topics are C# and Visual Basic.NET, which is fine. You may utilize <gm.exe> from any programming/scripting language that allows you to invoke a command line call. Regards, Joe
ASKER
Thank you very much guys but it didn't help me.
The first solution changes the image to 32 BPP (I'm looking for a way to save the image as 8 BPP)
The second solution is not .net code, i do not want to use a thrid party exe, Im looking for an integrated solution via .Net.
Thank you very much and I will be glad to get more suggestions.
The first solution changes the image to 32 BPP (I'm looking for a way to save the image as 8 BPP)
The second solution is not .net code, i do not want to use a thrid party exe, Im looking for an integrated solution via .Net.
Thank you very much and I will be glad to get more suggestions.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Open in new window
The link is dead, and I haven't bothered how many BPP is creates, but I see only three byte values other than Black and White, so it may be 8 BPP./gustav