Page 2 of 2

Re: Possible to convert the alpha channel to unmatted?

Posted: 2017-02-27T13:44:01-07:00
by fmw42
What about this one from your cloud link?

http://www.fmwconcepts.com/misc_tests/s ... _cloud.png

Re: Possible to convert the alpha channel to unmatted?

Posted: 2017-02-27T14:03:21-07:00
by fmw42
Sorry, correct command and image are:

Code: Select all

convert 00a9.svg -transparent white -units pixelspercentimeter -density 37.8 -depth 8 00a9_im8b.png
http://www.fmwconcepts.com/misc_tests/s ... 9_im8b.png

Re: Possible to convert the alpha channel to unmatted?

Posted: 2017-02-27T14:34:35-07:00
by imlost123
fmw42 wrote: 2017-02-27T14:03:21-07:00 Sorry, correct command and image are:

Code: Select all

convert 00a9.svg -transparent white -units pixelspercentimeter -density 37.8 -depth 8 00a9_im8b.png
http://www.fmwconcepts.com/misc_tests/s ... 9_im8b.png
Sorry no this one doesn't work.
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
Yeah this one works fine.

Re: Possible to convert the alpha channel to unmatted?

Posted: 2017-02-27T16:19:40-07:00
by fmw42
How about this one:

Code: Select all

convert 00a9.svg -transparent white -background black -alpha background -units pixelspercentimeter -density 37.8 -depth 8 PNG8:00a9_im8c.png
http://www.fmwconcepts.com/misc_tests/s ... 9_im8c.png

or this one

Code: Select all

convert -background transparent 00a9.svg -units pixelspercentimeter -density 37.8 -depth 8 00a9_im8d.png
http://www.fmwconcepts.com/misc_tests/s ... 9_im8d.png

Re: Possible to convert the alpha channel to unmatted?

Posted: 2017-02-27T17:02:41-07:00
by imlost123
fmw42 wrote: 2017-02-27T16:19:40-07:00 How about this one:

Code: Select all

convert 00a9.svg -transparent white -background black -alpha background -units pixelspercentimeter -density 37.8 -depth 8 PNG8:00a9_im8c.png
http://www.fmwconcepts.com/misc_tests/s ... 9_im8c.png

or this one

Code: Select all

convert -background transparent 00a9.svg -units pixelspercentimeter -density 37.8 -depth 8 00a9_im8d.png
http://www.fmwconcepts.com/misc_tests/s ... 9_im8d.png
Yes! that very last command works now, thanks so much! Amazing!

So if I want to batch convert a whole folder I'd just do
mogrify -background transparent -units pixelspercentimeter -density 37.8 -depth 8 -format *.png *.svg
?

Re: Possible to convert the alpha channel to unmatted?

Posted: 2017-02-27T17:05:52-07:00
by fmw42
try

Code: Select all

mogrify -background transparent -units pixelspercentimeter -density 37.8 -depth 8 -format png *.svg
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.

Also, I am not sure the density of 37.8 will be correct for all your svg files. But perhaps you do not care.

Re: Possible to convert the alpha channel to unmatted?

Posted: 2017-02-27T17:09:01-07:00
by fmw42
You could try just

Code: Select all

mogrify -background transparent -units pixelspercentimeter -depth 8 -format png *.svg
If the previous mogrify works.

Re: Possible to convert the alpha channel to unmatted?

Posted: 2017-02-27T17:40:45-07:00
by imlost123
fmw42 wrote: 2017-02-27T17:05:52-07:00 try

Code: Select all

mogrify -background transparent -units pixelspercentimeter -density 37.8 -depth 8 -format png *.svg
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.

Also, I am not sure the density of 37.8 will be correct for all your svg files. But perhaps you do not care.
No that seems perfect, it's converting away now and they seem fine so far.
Thanks again, I really love this software, makes me feel like I'm some sort of super hacker 8) :lol:

Re: Possible to convert the alpha channel to unmatted?

Posted: 2017-02-27T17:44:49-07:00
by fmw42
Glad that finally worked out.