Skip to main content
Known Participant
April 19, 2009
Question

Export options GIF not working properly

  • April 19, 2009
  • 3 replies
  • 1803 views

Hi,

So I have this wonderful script I wrote to export layers to gifs.  And when I try to set opts.lossy = 0; Photoshop completley ignores me.  It is also ignoring opts.interlaced = true;

It's always setting my lossy to 60 and my interlaced to false.  What gives?  Is this a bug?  thanks,

Stan

This topic has been closed for replies.

3 replies

Skjorn
Participant
June 24, 2014

I stumbled on the same bug in CS2. ExportOptionsSaveForWeb.interlaced and ExportOptionsSaveForWeb.blur are ignored for JPEG and remembered settings from the Save For Web dialog are used instead. It definitely is a bug.

I'm starting to hate Photoshop scripting. Do I have to do everything via ActionManager?! It sucks...

garek0071Author
Known Participant
April 19, 2009

function saveForWebGIF(toWhere,file,qual,name){
toWhere = new File(toWhere+name+".gif");

    var opts = new ExportOptionsSaveForWeb();
opts.lossy = 0;
opts.interlaced = false;
opts.transparency = false;
opts.colorReduction = ColorReductionType.PERCEPTUAL;// selective is default
opts.format = SaveDocumentType.COMPUSERVEGIF;
opts.colors = qual;
opts.dither = Dither.DIFFUSION;
opts.ditherAmount = 88;


file.exportDocument(toWhere, ExportType.SAVEFORWEB, opts);

}

Inspiring
April 19, 2009

The code looks fine.

Do the SFW manually and examine the ScriptingListener output.  It may provide a clue.

garek0071Author
Known Participant
April 19, 2009

I know it does look fine right?  that's why I think it's a damn bug.  I guess I could use script listener and get the settings I need that way....

Inspiring
April 19, 2009

Post the code where you are setting your options.

-X