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

Complex asset generation from single file

New Here ,
Jul 06, 2020 Jul 06, 2020

Copy link to clipboard

Copied

Hi Everyone!
 
I'm trying to automate some complex image generation and I can't quite find the right tools.
I start with a PSD. That PSD has to get cropped into 3 different dimensions (I'm thinking of making either different art boards or slices here, not sure). Those 3 resulting images need to be exported in 1x and 2x sizes (this is for a mobile app) as JPG. The kicker is that all 6 exported images have to be under 1mb; and I have to do this one million times in one day 😞
 
So I've been studying generator and if only it had a "limit file size" command it would be perfect.
 
As it stands I could "save for web > user slices" but that won't give me save scaling like 1x or 2x or I could "export as" but that won't give me the size optimization command.
 
Should I look into InDesign for this?
 
Help!
TOPICS
Actions and scripting

Views

121

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 Beginner ,
Jul 07, 2020 Jul 07, 2020

Copy link to clipboard

Copied

InDesign is more meant for designing layouts, not for your specific problem.

It seems that your crops are always made at the same coordinates and with identical width & height, is that correct?

If correct, you can indeed use slices. If at all possible, you'll achieve a higher final quality by downsizing instead of upscaling. Would that be possible? --> instead of x1 & x2, do x1 and x.5.

Saving under 1MB can be done by dividing the product of dimension & bit depth by your target size (1MB) in bits (ie: 8000000) to configure the saving quality from anywhere between 1 and 12.

saveQuality = Math.round(12 * (1 - dimDepth / targetSize))

Something of that nature anyway...

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
New Here ,
Jul 07, 2020 Jul 07, 2020

Copy link to clipboard

Copied

LATEST

Awesome, thanks for the tips!

 

So the individual crops and their respective 2x (or .5x) versions have to be identical but not between them. I totally agree about downsampling too; I'm just trying to speak the lingo of the UI designers now. 

 

So for "saveQuality = Math.round(12 * (1 - dimDepth / targetSize))", where would that go exaclty? I haven't crossed the rubicon into scripting yet.

 

Thanks again!

 

 

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