[SOLVED] Create 8bit non-palletized greyscale TGA or BMP
Posted: 2015-10-12T01:07:58-07:00
I need to convert a 24 bit png to greyscale and save it as TGA or BMP with 8bpp no palette.
I'm using
which converts the image correctly and does save as 8bpp, but it uses a palette. No matter what I try I can't seem to get a true grey-scale in the data instead of a palletized image.
Is there a way to force this? I'm happy to use another image format if this can't be done with TGA or BMP. My only requirement is that the format is simple enough to read easily with python without the use of external libraries (Not using PIL for example or any other dependencies apart from a my python script and the convert exe). I just need to load the raw uncompressed grey-scale image data as a byte array in python.
Thanks,
Max
I'm using
Code: Select all
convert source.png -grayscale Lightness -colors 256 -compress None dest.tga
Is there a way to force this? I'm happy to use another image format if this can't be done with TGA or BMP. My only requirement is that the format is simple enough to read easily with python without the use of external libraries (Not using PIL for example or any other dependencies apart from a my python script and the convert exe). I just need to load the raw uncompressed grey-scale image data as a byte array in python.
Thanks,
Max