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

Get image size before import

Explorer ,
Jul 09, 2021 Jul 09, 2021

Copy link to clipboard

Copied

Can I get the size of the image before importing it into Illustrator? for example, if I have five images on drive "c:\test" and I want to import the smallest one, is it possible to do it?

 
 
 
 
 
TOPICS
Scripting

Views

206

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 ,
Jul 09, 2021 Jul 09, 2021

Copy link to clipboard

Copied

Size is an ambivalent term in this context; do you mean size as in x MB or as in x mm by x mm? 

What is the images’ file format? 

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 ,
Jul 09, 2021 Jul 09, 2021

Copy link to clipboard

Copied

If you're referring to your source files, just click once on them in Windows Explorer or Apple Finder window, depending on your platform, then right-click on them and select Properties (Windows) or Get Info (Mac).

 

From there, you'll be able to determine, by filesize and by resolution, which version of the file best suits your needs before you import it into Illustrator.

 

Hope this helps,

 

Randy

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 ,
Jul 09, 2021 Jul 09, 2021

Copy link to clipboard

Copied

LATEST

 

// get files (e.g. JPGs) in folder "Test" in "Desktop"
// remove or modify filter ("*.jpg") as required
var folder1 = new Folder("~/Desktop/Test");
var files = folder1.getFiles("*.jpg");

// sort files by size (bytes), from smallest to largest
files.sort(function(a, b) {return a.length - b.length;})

// place smallest file in open document
var pic1 = app.activeDocument.placedItems.add();
pic1.file = files[0];

 

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