Re: Possible to convert the alpha channel to unmatted?
Posted: 2017-02-27T13:44:01-07:00
Use https://github.com/ImageMagick/ImageMagick/discussions instead.
https://imagemagick.com/discourse-server/
https://imagemagick.com/discourse-server/viewtopic.php?t=31491
Code: Select all
convert 00a9.svg -transparent white -units pixelspercentimeter -density 37.8 -depth 8 00a9_im8b.png
Sorry no this one doesn't work.fmw42 wrote: ↑2017-02-27T14:03:21-07:00 Sorry, correct command and image are:
http://www.fmwconcepts.com/misc_tests/s ... 9_im8b.pngCode: Select all
convert 00a9.svg -transparent white -units pixelspercentimeter -density 37.8 -depth 8 00a9_im8b.png
Yeah this one works fine.fmw42 wrote: ↑2017-02-27T13:44:01-07:00 What about this one from your cloud link?
http://www.fmwconcepts.com/misc_tests/s ... _cloud.png
Code: Select all
convert 00a9.svg -transparent white -background black -alpha background -units pixelspercentimeter -density 37.8 -depth 8 PNG8:00a9_im8c.png
Code: Select all
convert -background transparent 00a9.svg -units pixelspercentimeter -density 37.8 -depth 8 00a9_im8d.png
Yes! that very last command works now, thanks so much! Amazing!fmw42 wrote: ↑2017-02-27T16:19:40-07:00 How about this one:
http://www.fmwconcepts.com/misc_tests/s ... 9_im8c.pngCode: Select all
convert 00a9.svg -transparent white -background black -alpha background -units pixelspercentimeter -density 37.8 -depth 8 PNG8:00a9_im8c.png
or this one
http://www.fmwconcepts.com/misc_tests/s ... 9_im8d.pngCode: Select all
convert -background transparent 00a9.svg -units pixelspercentimeter -density 37.8 -depth 8 00a9_im8d.png
?mogrify -background transparent -units pixelspercentimeter -density 37.8 -depth 8 -format *.png *.svg
Code: Select all
mogrify -background transparent -units pixelspercentimeter -density 37.8 -depth 8 -format png *.svg
Code: Select all
mogrify -background transparent -units pixelspercentimeter -depth 8 -format png *.svg
No that seems perfect, it's converting away now and they seem fine so far.fmw42 wrote: ↑2017-02-27T17:05:52-07:00 try
But I am not sure it will work, because it may try to do -background transparent after reading the svg and not before as per my convert command. If it does not work, then you may have to write a script loop over each image in a folder using convert as in my example above.Code: Select all
mogrify -background transparent -units pixelspercentimeter -density 37.8 -depth 8 -format png *.svg
Also, I am not sure the density of 37.8 will be correct for all your svg files. But perhaps you do not care.