• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
1

Export options GIF not working properly

Explorer ,
Apr 19, 2009 Apr 19, 2009

Copy link to clipboard

Copied

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

TOPICS
Actions and scripting

Views

1.7K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
Advisor ,
Apr 19, 2009 Apr 19, 2009

Copy link to clipboard

Copied

Post the code where you are setting your options.

-X

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Apr 19, 2009 Apr 19, 2009

Copy link to clipboard

Copied

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);

}

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Apr 19, 2009 Apr 19, 2009

Copy link to clipboard

Copied

The code looks fine.

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Apr 19, 2009 Apr 19, 2009

Copy link to clipboard

Copied

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....

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jun 23, 2014 Jun 23, 2014

Copy link to clipboard

Copied

LATEST

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...

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines