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

Need a help for javascript in photoshop

Community Beginner ,
Jun 02, 2021 Jun 02, 2021

Copy link to clipboard

Copied

How to get the storage space size of pictures through javascript in photoshop?

TOPICS
Actions and scripting

Views

601

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

correct answers 1 Correct answer

Contributor , Jun 02, 2021 Jun 02, 2021

And what storage space + file format?

 

You could save a file somewhere temporarily and then read the filesize from that temporary location before moving it to where you want it to go eventually.

 

This is the filesize part:

#target photoshop;
var fileRef = "C:/myImage.jpg";
var x = new File( fileRef ) ;
alert(x.length);

 

On windows, if you have an image at this location C:/myImage.jpg it will work.

Votes

Translate

Translate
Adobe
LEGEND ,
Jun 02, 2021 Jun 02, 2021

Copy link to clipboard

Copied

Which pictures?

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
LEGEND ,
Jun 02, 2021 Jun 02, 2021

Copy link to clipboard

Copied

The info does not exist for a picture you are editing. It can only be known by saving 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 Expert ,
Jun 02, 2021 Jun 02, 2021

Copy link to clipboard

Copied

What do you mean by Storage Space size?  What kind storage disk storage.  Photoshop ram requitements Pictures can be quite complex they can have  up to  8,000 layers.

JJMack

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
Contributor ,
Jun 02, 2021 Jun 02, 2021

Copy link to clipboard

Copied

And what storage space + file format?

 

You could save a file somewhere temporarily and then read the filesize from that temporary location before moving it to where you want it to go eventually.

 

This is the filesize part:

#target photoshop;
var fileRef = "C:/myImage.jpg";
var x = new File( fileRef ) ;
alert(x.length);

 

On windows, if you have an image at this location C:/myImage.jpg it will work.

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 ,
Jun 02, 2021 Jun 02, 2021

Copy link to clipboard

Copied

LATEST

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