Resize without altering the palette (solved)
Posted: 2009-06-30T08:22:22-07:00
I am converting a movie from ntsc to pal, the subtitles (as the movie) need to be converted from the resolution of 720x480 to 720x576.
The subtitles are 8bits png files with at most 4 colours (one being the transparency), to convert all the files I used:
Unfortunately every subtitle file must use the _same_ four colours.
Using convert this way the four colours in each file can be (and are) different.
How can I force convert to maintain the original colours or how can I set the palette?
Thanks.
The subtitles are 8bits png files with at most 4 colours (one being the transparency), to convert all the files I used:
Code: Select all
for d in *.png ;do
convert "$d" -resize '720x576!' -colors 4 tmp.png || break
mv tmp.png "$d"
done
Using convert this way the four colours in each file can be (and are) different.
How can I force convert to maintain the original colours or how can I set the palette?
Thanks.