4 Replies Latest reply on Mar 28, 2018 6:41 AM by hhhhhhhhhhhhhh5

    Resizing image with vector layers while keeping transparency.

    hhhhhhhhhhhhhh5 Level 1

      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?