Discussion:
Transparency PNG Issue
Matthew Richer
2011-03-17 15:53:56 UTC
Permalink
I've been able to resolve the 'grainy lettering' on the PNG->JPG issue but
when thumbnailed using mogrify and the below command it still fails.
Basically all I did was clone the image, make it entirely white, swap it,
and put it 'underneath' the original image (made a background image).



Also I get an error on -clone -1 or +clone when using mogrify so not sure
what I'm doing wrong there.



This works and gives nice smoothing lettering/transition:

convert.exe "frame-1.png" ( +clone -alpha opaque -fill white -colorize 100%
) +swap -geometry +0+0 -compose Over -composite -alpha off -thumbnail 90x90
"frame-1.jpg"



This doesn't:



Mogrify.exe -format jpg ( +clone -alpha opaque -fill white -colorize 100% )
+swap -geometry +0+0 -compose Over -composite -alpha off -thumbnail 90x90
*.png



mogrify.exe: unrecognized option `+clone' @
error/mogrify.c/MogrifyImageCommand/

4560.



This doesn't' either:



Mogrify.exe -format jpg ( -clone -1 -alpha opaque -fill white -colorize 100%
) +swap -geometry +0+0 -compose Over -composite -alpha off -thumbnail 90x90
*.png



mogrify.exe: unrecognized option `-clone' @
error/mogrify.c/MogrifyImageCommand/

4560.







Thanks again,

Matt
Matthew Richer
2011-03-17 15:34:06 UTC
Permalink
I have extracted a bunch frames into PNG named according to:



if < 10 frame-1.png up to frame-9.png (basically %d).

If < 100 frame-01.png up to frame-99.png (basically %2d)

If < 1000 frame-001.png up to frame-999.png (basically %3d)

Etc.



These images I'm seeing has some sort of transparency setting on it (see
link for frame-1.png). I want to kill the transparency and get a white
background.



convert frame-1.png frame-1.jpg -- no good, goes black(ish).

convert frame-1.png -alpha off frame-1.jpg - same as above - see
frame-1-bad.jpg.

convert frame-1.png -alpha background frame-1.jpg - ya! It works (still a
little grainy around the lettering)



Now I need to do it in batch.



mogrify -format jpg -alpha background *.png



Now I need to also thumbnail them.



mogrify -format jpg -alpha background -thumbnail 90x90 *.png - oh, oh this
reverted back to the blackish thing.

mogrify -format jpg -thumbnail 90x90 -alpha background *.png - kinda works
but the black smudges are still there.



Thoughts? Basically I think the PNG has some sort of transparency without
using alpha channel, anyway I can get a 'normal' alpha channel they will
just drop to white when I go to PNG?



Links:



frame-1.png - Loading Image...

frame-1.jpg - Loading Image...

frame-1-bad.jpg - Loading Image...





Thanks!

Matt

Continue reading on narkive:
Loading...