Hi there,
I am attempting to convert a png file that has totally transparent areas and partially transparent areas to a tga format using this:
for %%f in (*.png) do (
convert "%%~f" PNG24:- | convert "%%~nf.tga"
)
However, while the result tga does keep the full transparent areas, the 20% or 40% transparent areas are made of solid color instead of holding the transparency.
I tried using some examples I found on this forum as to include alpha on, but I had no luck in nailing a correct command line.
What am I missing?
Thank you!
Convert PNG to TGA with full range transparency
-
- Posts: 2
- Joined: 2019-05-15T06:42:49-07:00
- Authentication code: 1152
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Convert PNG to TGA with full range transparency
Why are you running two convert commands? Why not just one?BlakeNowah wrote:convert "%%~f" PNG24:- | convert "%%~nf.tga"
The second command has no input from the pipe, so what you have shown won't work. If it did work, you use an intermediate format "PNG24:" which has no alpha channel.
I suggest:
Code: Select all
convert "%%~f" "%%~nf.tga"
snibgo's IM pages: im.snibgo.com
-
- Posts: 2
- Joined: 2019-05-15T06:42:49-07:00
- Authentication code: 1152
Re: Convert PNG to TGA with full range transparency
I copy-pasted that from somewhere. I noticed the OR, but I thought it's meant for some fail-safe situation.
My bad, I used it without knowing fully what it does.
Oh, it was that simple. It worked perfectly, indeed.
Thank you kindly!