PSD to JSX
-
csuebele
PSD to JSX
It depends what you have on your template. If nothing on your template has to be scaled proportionally, you can just resize your entire document. You can get the code from scriptListener also and just use put a variable where the scriptListner code put a value that you can change. If you have elements that require to be scaled, you can set your document size, then add all your elements with the code that you got from scriptListner, then just scale that layer to whatever the document size is, and re-position the layer using the translate function. It actually would be better to establish the document size first then insert all your elements and scale them using percentages.
-
jjmacks
PSD to JSX
Scaling a PSD Template up or down is size while maintain the PSD Aspect Ratio is easy can be done with a simple Image size resample.
However changing the templates Aspect ratio presents many problem if you do not want distortion. While Images placed into rectangular areas with an aspect ratio change that an image size not constrained would produce might be OK. Other element in the template would suffer and not be OK. Raster layers would be distorted, I don't know how text would resize. Image placed shape would be off because circle would be ovals and squares become rectangles and other shapes distort. So changing the aspect ration of a template psd file is difficult. You can change the PSD Document Canvas size after converting the PSD background to a normal layer. Then go about scaling all layers and channels by some percentage the same percentage width and height to maintain their proportions and fit the new document size and aspect ratio then try to figure out where they need to be located. Not something I would like to tackle.
I think it would be easier to create same templates for different aspect ratios output and just use image re-size to re-size them for current size requirement.
However changing the templates Aspect ratio presents many problem if you do not want distortion. While Images placed into rectangular areas with an aspect ratio change that an image size not constrained would produce might be OK. Other element in the template would suffer and not be OK. Raster layers would be distorted, I don't know how text would resize. Image placed shape would be off because circle would be ovals and squares become rectangles and other shapes distort. So changing the aspect ration of a template psd file is difficult. You can change the PSD Document Canvas size after converting the PSD background to a normal layer. Then go about scaling all layers and channels by some percentage the same percentage width and height to maintain their proportions and fit the new document size and aspect ratio then try to figure out where they need to be located. Not something I would like to tackle.
I think it would be easier to create same templates for different aspect ratios output and just use image re-size to re-size them for current size requirement.