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

Resizing image with vector layers while keeping transparency.

Engaged ,
Mar 27, 2018 Mar 27, 2018

Copy link to clipboard

Copied

Hello. I have a script that saves a large image in multiple resolutions to PNG. The image has several layers, some of them are vector-based. Before resizing, I call

app.activeDocument.flatten();

Otherwise, the vectors will not scale (interestingly, this happens only when resizing via script, not manually). However flattening the image removes transparency. Do you have any suggestions on how to deal with this? I'm thinking using script to rasterize all the vector layers before resizing, but perhaps I'm missing a better solution?

TOPICS
Actions and scripting

Views

578

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

Community Expert , Mar 27, 2018 Mar 27, 2018

How about using merge visible instead?

var idMrgV = charIDToTypeID( "MrgV" );

executeAction( idMrgV, undefined, DialogModes.NO );

Votes

Translate

Translate
Adobe
Community Expert ,
Mar 27, 2018 Mar 27, 2018

Copy link to clipboard

Copied

How about using merge visible instead?

var idMrgV = charIDToTypeID( "MrgV" );

executeAction( idMrgV, undefined, DialogModes.NO );

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
Engaged ,
Mar 28, 2018 Mar 28, 2018

Copy link to clipboard

Copied

LATEST

Thank you Chuck. Works great!

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 ,
Mar 27, 2018 Mar 27, 2018

Copy link to clipboard

Copied

Flatten merges all layer into a background layer. Photoshop's background is a special bottom layer that is canvas size that does not support transparency.  It transparency is locked all pixels are 100% opaque.

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
Advocate ,
Mar 28, 2018 Mar 28, 2018

Copy link to clipboard

Copied

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