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

How set frame delay of gif with Photoshop Script

New Here ,
Feb 22, 2020 Feb 22, 2020

Copy link to clipboard

Copied

I'm new at this. I'll be glad for any advice. I researched the documentation and also tried to find something useful here but I didn't find anything. I try to write the code which gets the last frame of the gif and sets the delay of this frame. Like on this screenshot in Photoshop. Any ideas? Thanks for attention!

Pseudocode example: 


const allFrames = myGif.getAllFrames

const lastFrame = allFrames[allFrames.length - 1]

lastFrame.setFrameDalay(1)

 

Something like this...

 
 

Untitled-1.jpg

TOPICS
Actions and scripting

Views

2.6K

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
Community Expert ,
Feb 22, 2020 Feb 22, 2020

Copy link to clipboard

Copied

Please post the name of the Adobe program you use so a Moderator may move this message to that forum

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
New Here ,
Feb 23, 2020 Feb 23, 2020

Copy link to clipboard

Copied

I use Adobe Photoshop. And I want to automate some work with usage Photoshop Script. Can you give me advice about where I can ask about it? Thanks in advance!

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 Expert ,
Feb 22, 2020 Feb 22, 2020

Copy link to clipboard

Copied

I don't know what code you're talking about. This has nothing to do with code.

 

  1. From Photoshop CC,  click on the last frame in your timeline, click the downward triangle and select your delay rate from the list. 
  2. File > Export > Save for Web (legacy) > animated GIF.

 

Nancy O'Shea— Product User, Community Expert & Moderator
Alt-Web Design & Publishing ~ Web : Print : Graphics : Media

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
New Here ,
Feb 24, 2020 Feb 24, 2020

Copy link to clipboard

Copied

Thank you for your answer! But I try to do the same actions with help Photoshop Script to automate. Probably I am asking in the wrong place about it.

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 ,
Dec 03, 2022 Dec 03, 2022

Copy link to clipboard

Copied

Hello,

 

I came by this page, which is a little old. If you have not solved your issue, here is a link to scripting guides for photoshop, you should find guides using different scripting languages.

I hope they are useful.

 

https://github.com/Adobe-CEP/CEP-Resources/tree/master/Documentation/Product%20specific%20Documentat...

 

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
Guide ,
Dec 03, 2022 Dec 03, 2022

Copy link to clipboard

Copied

LATEST

They are useless in this case.

This code solves the author's problem, but you will not find information about the animation frame class in the scripting guides.

 

var s2t = stringIDToTypeID;

(r = new ActionReference()).putEnumerated(s2t("animationFrameClass"), s2t("ordinal"), s2t("last"));
(d = new ActionDescriptor()).putReference(s2t("target"), r);
executeAction(s2t("animationFrameActivate"), d, DialogModes.NO);

(d1 = new ActionDescriptor()).putDouble(s2t("animationFrameDelay"), 1);
d.putObject(s2t("to"), s2t("animationFrameClass"), d1);
executeAction(s2t("set"), d, DialogModes.NO);

 

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