alpha problem while converting tga to 8 bit png
Posted: 2013-10-17T05:35:20-07:00
Hi community!
I'm having a small problem while converting a tga to png. The png should be 25% of the original size. Also be an 8 bit png. So far. The only problem now is, that IM cuts too many pixels.
Here is what I am doing. The filenames are just placeholders, coz this is running in a script and is called step by step:
Any idea how to solve this problem? Would be really great if someone can help me with that, coz am not an expert with this.
Thanks a lot
I'm having a small problem while converting a tga to png. The png should be 25% of the original size. Also be an 8 bit png. So far. The only problem now is, that IM cuts too many pixels.
Here is what I am doing. The filenames are just placeholders, coz this is running in a script and is called step by step:
- convert -alpha background -background "#757834" -alpha off $source_filepath $temp1_filepath
convert -resize 25% -sharpen 0x0.6 -quantize srgb -colors 255 $temp1_filepath $temp1_filepath
convert -resize 25% -dither None -quantize srgb -colors 255 $source_filepath $temp2_filepath
composite -compose CopyOpacity $temp2_filepath $temp1_filepath $target_filepath
convert -define png:format=png8 $target_filepath $target_filepath
convert -trim $target_filepath $target_filepath
Any idea how to solve this problem? Would be really great if someone can help me with that, coz am not an expert with this.
Thanks a lot