Convert PSD to TGA - preserve alpha channel

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
Rastar
Posts: 4
Joined: 2014-06-02T07:27:34-07:00
Authentication code: 6789

Convert PSD to TGA - preserve alpha channel

Post by Rastar »

I am trying to convert a Photoshop (psd) file to the TGA format. The original has an alpha channel, but I seem to be unable to get this over into the target image. I tried both convert and mogrify and all the different -alpha options (on, set etc), but to no avail.

What exactly would be the command line for doing this? Thanks!
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Convert PSD to TGA - preserve alpha channel

Post by snibgo »

As I understand it (I don't), PSD files have different types of alpha. IM understands only one of them.

If you put the PSD somewhere like dropbox.com and paste the URL here, someone can take a look.
snibgo's IM pages: im.snibgo.com
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Convert PSD to TGA - preserve alpha channel

Post by fmw42 »

What version of IM are you using and what platform? Please always provide that.

According to the changelog a bug was fixed for transparency in PSD files recently.

2014-05-12 6.8.9-2 Dirk Lemstra <dirk@snakeware...>
Fixed detecting transparency in PSD files (reference viewtopic.php?f=3&t=25634).

But I am not sure if IM supports transparency in targa files.

Try converting a PNG with transparency to targa. If that works, then it might be the PSD fix and you might need to upgrade.
Rastar
Posts: 4
Joined: 2014-06-02T07:27:34-07:00
Authentication code: 6789

Re: Convert PSD to TGA - preserve alpha channel

Post by Rastar »

Well, I have 6.8.9-1 (on OSX 10.9 by the way). Alphas from other formats usually work, so I guess I have to update. Thanks!
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Convert PSD to TGA - preserve alpha channel

Post by fmw42 »

Rastar wrote:Well, I have 6.8.9-1 (on OSX 10.9 by the way). Alphas from other formats usually work, so I guess I have to update. Thanks!
6.8.9.1 should be fine.

Please upload your PSD file to dropbox.com (public folder) and put a link here so the IM developers and others can see how your PSD file has defined transparency.
Rastar
Posts: 4
Joined: 2014-06-02T07:27:34-07:00
Authentication code: 6789

Re: Convert PSD to TGA - preserve alpha channel

Post by Rastar »

Hi,

this is a texture from a third-party (commercial) game asset package, so I don't feel comfortable putting it on a public drive. i wouldn't write sending it per PM though, so if a IM developer is interested in looking into this just let me know where to send it to. Thanks for your support!
User avatar
dlemstra
Posts: 1570
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

Re: Convert PSD to TGA - preserve alpha channel

Post by dlemstra »

Send me a PM with a link to a dropbox file or your e-mail where I can contact you. Did you upgrade to 6.8.9-2?
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Convert PSD to TGA - preserve alpha channel

Post by fmw42 »

Try upgrading to 6.8.9.2. I notice there are some changes to fix issues with both PSD and Targa that dlemstra made. From the changelog


2014-05-12 6.8.9-2 Dirk Lemstra <dirk@snakeware...>
Added support for writing RLE compressed TGA files (reference viewtopic.php?f=3&t=12335).
Fixed detecting transparency in PSD files (reference viewtopic.php?f=3&t=25634).
Post Reply