how to create a completely transparent png?

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
linjuming
Posts: 122
Joined: 2011-01-25T00:09:50-07:00
Authentication code: 8675308

how to create a completely transparent png?

Post by linjuming »

how to create a completely transparent png?

convert -size 200x100 xc:transparent img/selected_overlay/selected_overlay.png (black color)
convert -size 200x100 xc:none img/selected_overlay/selected_overlay.png (black color)
convert -size 200x100 img/selected_overlay/selected_overlay.png (error)

Image
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: how to create a completely transparent png?

Post by anthony »

there was a few versions that had problems in PNG output due to re-development work.

Upgrade to the very latest.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: how to create a completely transparent png?

Post by fmw42 »

this works just fine on IM 6.6.8.4 Q16 Mac OSX Tiger

convert -size 200x100 xc:none tmp.png
linjuming
Posts: 122
Joined: 2011-01-25T00:09:50-07:00
Authentication code: 8675308

Re: how to create a completely transparent png?

Post by linjuming »

thank you , so I will update the vesion ,hope i will help.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: how to create a completely transparent png?

Post by fmw42 »

try on your current version

convert -size 200x100 xc:"rgba(0,0,0,0)" PNG32:tmp.png

or

convert -size 200x100 xc:"rgba(0,0,0,0)" -type truecolormatte PNG32:tmp.png

see if that helps before upgrading.
linjuming
Posts: 122
Joined: 2011-01-25T00:09:50-07:00
Authentication code: 8675308

Re: how to create a completely transparent png?

Post by linjuming »

yes , it works
using "png32:" helps
Post Reply