Skip to main content
Known Participant
May 15, 2011
Question

Thumbnail size

  • May 15, 2011
  • 1 reply
  • 963 views
This is how I'm creating my thumbnails and getting their data:
var thumb = new Thumbnail(my_file);
var bitmap_data = thumb.core.thumbnail.thumbnail;
But what determines their size and how do I change it?
This topic has been closed for replies.

1 reply

Muppet_Mark-QAl63s
Inspiring
May 16, 2011

This is only my 'guess'… I would expect each authoring app to create it's own preview(s) if it can. Bridge generates and caches previews and there are some options in the app preferences. Such as 'Keep 100% previews in cache' and 'Generate Monitor Sized Previews'. Im not sure if these are exposed to script you would need to check… And I have not had the need yet to see if these make any difference. If you needed to change these then you may be required to purge the cached data… Again something I have yet to do. I think you can make a new bitmap from an image but Paul would know more on that than me. For other formats it looks like they are 72dpi at given dimensions (why bridge calculates incorrect dimensions)…

Paul Riggott
Inspiring
June 11, 2011

Hope this helps...


#target bridge

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

if(app.document.selectionsLength >0){
app.synchronousMode = true;
bm = Thumb.core.thumbnail.thumbnail;
app.synchronousMode = false;
$.writeln("Thumbnail - Width = " + bm.width +" Height = " + bm.height);

app.synchronousMode = true;
bm = Thumb.core.preview.preview;
app.synchronousMode = false;
$.writeln("Preview - Width = " + bm.width +" Height = " + bm.height);

app.synchronousMode = true;
bm = Thumb.core.fullsize.fullsize;
app.synchronousMode = false;
$.writeln("Fullsize - Width = " + bm.width +" Height = " + bm.height);

//resize longest side
//You can only downsize
bm = bm.resize(400,BitmapData.bicubicSharper);
$.writeln("Resized - Width = " + bm.width +" Height = " + bm.height);
}