Skip to main content
Participant
October 21, 2011
Answered

export thumbnails of swf/flv

  • October 21, 2011
  • 1 reply
  • 2782 views

Hi

I have to deliver thumbnails along with SWFs to an asset management tool.

Using Adobe Bridge (CS4) I can see previews of selected SWF files but can't see how to export them.

I tried the BridgeExportToJpegCS4 extension which works well for images but got an error for an SWF test file I have.

"Error: Could not obtain a valid bitmap to export."

I'm not sure I'm using the correct application but open to other suggestions.

Any ideas?

Also, I'd appreciate if there are any suggestion on how to extract the thumbnails and XMP metadata programmatically.

I'm a java developer and hoping I could automate this process for users through an SDK or by calling a utility.

Regards,

Carmine

This topic has been closed for replies.
Correct answer Paul Riggott

For a baseline, I used exiftool on a jpg file and it worked but on my swf it created a 0 byte file.

I guess a thumbnail doesn't exist for the files we have which changes the quest to see if a thumbnail can even be expected from swf.

Many Thanks for the help.


From a quick google search I found this...

http://www.eltima.com/products/swf-live-preview/

It looks as this might be able to create thumbnails.

1 reply

Paul Riggott
Inspiring
October 21, 2011

See http://forums.adobe.com/thread/852571?tstart=30 for an idea of sizes available.

Here is an example of getting a thumbnail and saving it on the desktop....

#target bridge

var thumb = app.document.selections[0];

var sourceBitmap = undefined;

app.synchronousMode = true;

sourceBitmap = thumb.core.thumbnail.thumbnail; //smallest

//sourceBitmap = thumb.core.preview.preview; //next size

app.synchronousMode = false;

if( !sourceBitmap || sourceBitmap.width == undefined || sourceBitmap.width == 0 ){

    alert("Unable to get bitmap");

    }else{

var Name = decodeURI(thumb.spec.name).replace(/\.[^\.]+$/, '');

var exportFile = new File( Folder.desktop + "/" + Name + "-thumb.jpg" );

sourceBitmap.exportTo( exportFile,  100);

}

There are many examples of extracting metadata and it might be best to look at some of them, also download the sdk where you will find all the documentation and examples.

http://www.adobe.com/devnet/bridge.html

If it looks a bit complex you could use ExifTool http://www.sno.phy.queensu.ca/~phil/exiftool/ as an alternative.

Participant
October 21, 2011

Hi Paul

Thanks for the snippet.  Except for the menu item addition, I added it as is to Bridge but got the alert error.

"Unable to get bitmap"

I also tried to comment out the thumbnail code and uncomment the preview but still no good.

I'll try to break up the if tests to see if I can nail down if there is no bitmap or if the width is 0;

Other suggestions?

Regards

Carmine

Paul Riggott
Inspiring
October 21, 2011

I would try ExifTool and see if that can extract a thumbnail

exiftool -b -ThumbnailImage MyPhoto.swf>MyThumb.jpg

If Exiftool can't extract a thumbnail, one doesn't exist.

Apart from this I'm out of suggestions as I don't use this type of file.

All the very best Carmine and good luck with the project.