using -define png:color-type=2 add grey row to bottom
Posted: 2018-07-30T15:27:49-07:00
I have a bunch of 16x16 pixel button images, whose "background" color was 192,192,192.
I need to replace that with transparency, and save as RGB png.
The replace is easy using:
(step1)
magick mogrify -fuzz 0%% -transparent "rgb(192,192,192)" "C:\CAD_Support\Menu Images\*.png"
But then many images get saved with indexed palette, not 24 bit rgb.
So I convert to RGB with:
(step 2)
magick mogrify -define png:color-type=2 "C:\CAD_Support\Menu Images\*.png"
and it runs, but on many images I get a grey (194,194,194) row along the bottom.
I can't get rid of that row, as step 1 converts it back to indexed palette.
I tried many other things, but none helped, only did bad things like removing transparency.
Am I dealing with a canvas edge issue?
thanks
I need to replace that with transparency, and save as RGB png.
The replace is easy using:
(step1)
magick mogrify -fuzz 0%% -transparent "rgb(192,192,192)" "C:\CAD_Support\Menu Images\*.png"
But then many images get saved with indexed palette, not 24 bit rgb.
So I convert to RGB with:
(step 2)
magick mogrify -define png:color-type=2 "C:\CAD_Support\Menu Images\*.png"
and it runs, but on many images I get a grey (194,194,194) row along the bottom.
I can't get rid of that row, as step 1 converts it back to indexed palette.
I tried many other things, but none helped, only did bad things like removing transparency.
Am I dealing with a canvas edge issue?
thanks