As my math is a not that powerful I am not able to solve this problem. I am posting with hope that someone with powerful math help me solve my problem:
I have following multi layered Main image loaded in ImageEn. Insert Image:
This Main image has 3 layers in all.
I have a PSD file with 9 layers.
And I need to load it (keeping intact all its layers) in Main image at the place where Layer 1 is by replacing it.
I am able to load and resize background of this PSD file keeping its original proportions (height width ratio), but am not able to resize rest of the layers and place them at proper position as per original file.
How can we calculate size of all layers base on background layers's new size and arrange all the layers properly?
Yes. After I scale Layer 0 based on the scaled (which may be either enlarged or reduced) I am trying to scale the rest of the layers and place (X and Y) them properly after inserting them in the Main image.