Skip to main content
daitranthanhoa
Inspiring
June 10, 2021
Question

How can export object to gif file?

  • June 10, 2021
  • 4 replies
  • 737 views

How can export object to file.gif?

i try this code, but file.gif is not valid.

var strImg=strImg_Folder +"/test.gif" ;
var file = new File(strImg);
oTargetObject.exportFile (ExportFormat.JPG,file);

 

 

This topic has been closed for replies.

4 replies

Community Expert
June 10, 2021

"When do we use this setting:
Document.ExportForWebPreference.imageConversion=ImageConversion.GIF;"

 

Well, yes, that could be an option if PhotoShop is not available. Duplicate the items you want to export as GIF to a new document and export to HTML. You should see one or more GIFs in the exported folder.

 

Regards,
Uwe Laubender

( ACP )

manal shanableh
Community Expert
June 10, 2021

exporting to gif file from indesign is not valid.

 

but you can copy the object form indesign, past it on photoshop canvas as smark object, export as Gif,

 

and for fun, you can add animation to gif file from photoshop using timeline..

Community Expert
June 10, 2021

You need PhotoShop to do this.

 

Regards,
Uwe Laubender

( ACP )

daitranthanhoa
Inspiring
June 10, 2021

Hi Laubender,

When do we use this setting:
Document.ExportForWebPreference.imageConversion=ImageConversion.GIF;

Community Expert
June 10, 2021
quote

How can export object to file.gif?

i try this code, but file.gif is not valid.

var strImg=strImg_Folder +"/test.gif" ;
var file = new File(strImg);
oTargetObject.exportFile (ExportFormat.JPG,file);


By @daitranthanhoa

I am not a coder - but surely the .JPG should be .GIF?

 

 

daitranthanhoa
Inspiring
June 10, 2021

Yes, ExportFormat not exist GIF. So i try with ExportFormat.JPG.

Brainiac
June 10, 2021

But that will just export JPEG files. You end up with a JPEG file called a GIF file. But this is like sticking a label on an orange saying it is an Apple.