How to make a PNG Transparent with their Alpha image?

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
Supalina
Posts: 1
Joined: 2015-10-05T02:11:30-07:00
Authentication code: 1151

How to make a PNG Transparent with their Alpha image?

Post by Supalina »

Hi everyone, so I'm trying to make a PNG picture background transparent already having its original Alpha 'layer'.
So all I found was this code.

Code: Select all

for %%f in (i\*.png) do convert %%f "i\%%~nf_A.png" -alpha Off -compose CopyOpacity -composite "out\%%~nf_out.png"
But it doesn't works, the following message appears; -The system cannot find message text for message number 0x234a in the message file for Application-. The original image name is '1.png' and the Alpha one is '2.png' am I doing something wrong? should I rename the pictures or change the code somehow? Thank you.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: How to make a PNG Transparent with their Alpha image?

Post by snibgo »

If you are processing only a single pair of files, why do you have a "for" loop?

If the filenames are 1.png and 2.png, why does the command use a file named {something}_A.png?
snibgo's IM pages: im.snibgo.com
Post Reply