Possible to convert the alpha channel to unmatted?
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Possible to convert the alpha channel to unmatted?
Sorry, correct command and image are:
http://www.fmwconcepts.com/misc_tests/s ... 9_im8b.png
Code: Select all
convert 00a9.svg -transparent white -units pixelspercentimeter -density 37.8 -depth 8 00a9_im8b.png
Re: Possible to convert the alpha channel to unmatted?
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
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Possible to convert the alpha channel to unmatted?
How about this one:
http://www.fmwconcepts.com/misc_tests/s ... 9_im8c.png
or this one
http://www.fmwconcepts.com/misc_tests/s ... 9_im8d.png
Code: 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
Code: Select all
convert -background transparent 00a9.svg -units pixelspercentimeter -density 37.8 -depth 8 00a9_im8d.png
Re: Possible to convert the alpha channel to unmatted?
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
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
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Possible to convert the alpha channel to unmatted?
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.
Also, I am not sure the density of 37.8 will be correct for all your svg files. But perhaps you do not care.
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.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Possible to convert the alpha channel to unmatted?
You could try just
If the previous mogrify works.
Code: Select all
mogrify -background transparent -units pixelspercentimeter -depth 8 -format png *.svg
Re: Possible to convert the alpha channel to unmatted?
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.
Thanks again, I really love this software, makes me feel like I'm some sort of super hacker
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Possible to convert the alpha channel to unmatted?
Glad that finally worked out.