TGA alpha channel

Anyone, especially newbies, asking for help with Photoshop Scripting and Photoshop Automation - as opposed to those contributing to discussion about an aspect of Photoshop Scripting

Moderators: Tom, Kukurykus

PhantomX
Posts: 3
Joined: Wed Jan 10, 2018 4:40 pm

TGA alpha channel

Post by PhantomX »

Hi,
I'm saving a TGA while specifying to save alpha channel, but when I open the TGA the alpha channel is not there. Anyone knows why it's not working and how to make it work?

I'm using Photoshop CS5.1 and here's my code:

Code: Select all


	var doc = app.activeDocument;  
var tgaFile = File(rawPath);
var tgaSaveOptions = new TargaSaveOptions();

// Save alpha channel
tgaSaveOptions.alphaChannels = true;
tgaSaveOptions.rleCompression = false

doc.saveAs(tgaFile, tgaSaveOptions, true, Extension.LOWERCASE);
Thanks!
User avatar
Kukurykus
Posts: 528
Joined: Mon Jul 25, 2016 12:36 pm

Re: TGA alpha channel

Post by Kukurykus »

Code: Select all

tgaSaveOptions.resolution = TargaBitsPerPixels.THIRTYTWO
PhantomX
Posts: 3
Joined: Wed Jan 10, 2018 4:40 pm

Re: TGA alpha channel

Post by PhantomX »

works! thanks :)