Page 1 of 1
How to convert RGBA4444 TGA files to RGBA8888 ?
Posted: 2017-03-06T05:55:09-07:00
by pierro787
Hi,
I have several thousands of tga files (without palette) wich contain RGBA4444 data (I know usualy tga files don't contain RGBA4444 datas). I would like to convert them into RGBA8888 data. I use the following command line
convert -depth 4 woody4.tga -depth 8 woddy8.tga
In this case, woody4.tga is the original rgba4444 file, and woody8 the target rgba8888 file but it doesn't change the colors of my pictures, what am I missing ?
Thanks,
Pierre
Re: How to convert RGBA4444 TGA files to RGBA8888 ?
Posted: 2017-03-06T10:16:12-07:00
by snibgo
Are you saying your image files are not in a standard TGA format? Then I doubt IM can successfully read them.
Perhaps some kind of mangling with IM at the command line is possible. Are the pixels compressed? If not, the simplest method may be a simple program (or bash script) that reads the bytes and expand them to IM's "RGB:" format.
Re: How to convert RGBA4444 TGA files to RGBA8888 ?
Posted: 2017-03-06T10:43:48-07:00
by pierro787
Yes the data are not in a standard TGA format. Here are some of them:
http://www.maison-sartrouville.fr/voisin/
The pictures are from the game "Neigbours from hell". Some people wrote successfully a program to convert them with DarkBasic Pro from RGBA 4444 to RGBA 8888 but I'm asking if Imagemagick can not do the job successfully.
Thanks for your help,
Pierre
Re: How to convert RGBA4444 TGA files to RGBA8888 ?
Posted: 2017-03-06T10:45:19-07:00
by pierro787
The pixels are not compressed, there are simply 16 bits depth, no palette, nothing special except there are into the RGBA 4444 format.
Re: How to convert RGBA4444 TGA files to RGBA8888 ?
Posted: 2017-03-06T11:10:04-07:00
by fmw42
Need they be converted to TGA or any 8-bit per channel depth format?
What is your IM version and platform/OS? Please always provide that.
Re: How to convert RGBA4444 TGA files to RGBA8888 ?
Posted: 2017-03-06T11:11:47-07:00
by pierro787
any 8-bit per channel depth format wil be ok, BMP for example is OK
Thanks,
Re: How to convert RGBA4444 TGA files to RGBA8888 ?
Posted: 2017-03-06T11:13:24-07:00
by pierro787
My version is: ImageMagick 7.0.5-1 Q16 x64 2017-03-04 (Windows 10 64 bits)
Re: How to convert RGBA4444 TGA files to RGBA8888 ?
Posted: 2017-03-06T11:15:14-07:00
by fmw42
Does this do what you want?
Code: Select all
magick identify -verbose N_birthday_0000.tga
Channel depth:
red: 5-bit
green: 5-bit
blue: 5-bit
alpha: 1-bit
Code: Select all
magick N_birthday_0000.tga -depth 8 result.tga
Code: Select all
magick identify -verbose result.tga
Channel depth:
red: 8-bit
green: 8-bit
blue: 8-bit
alpha: 1-bit
Re: How to convert RGBA4444 TGA files to RGBA8888 ?
Posted: 2017-03-06T11:34:20-07:00
by snibgo
@pierro787: can you link to an example (eg .PNG) of what one of those images should look like? IM can read those TGA files, but I suppose it is misreading them, thinking they have 5 bits/channel/pixel when they really have only 4.