Hello,
I am loading a .psd file with three layers.
I am loading an image on Layer 0 and then saving the same file as JPG but in some cases all the layers except Layer 0 gets rotated.
Here is the code that I am using:
var
LW, LH: Integer;
begin
ImageEnView1.IO.Params.PSD_LoadLayers := True;
ImageEnView1.IO.Params.PSD_ReplaceLayers := True;
ImageEnView1.IO.LoadFromFileAuto('Double01.psd');
ImageEnView1.Fit();
ImageEnView1.LayersCurrent := 0;
LW := ImageEnView1.CurrentLayer.Width;
LH := ImageEnView1.CurrentLayer.Height;
ImageEnView1.IO.LoadFromFile('004.jpg');
ImageEnView1.CurrentLayer.Width := LW;
ImageEnView1.CurrentLayer.Height := LH;
ImageEnView1.Update;
ImageEnView1.LayersMergeFilter := rfLanczos3;
ImageEnView1.LayersSaveMergedTo('Test_1.jpg');
As the test files are quite big here is the link for downloading them:
http://www.mediafire.com/file/w9r80j5j9g05gqg/ProblamaticImage.zip
Here are two samples of the problem:

Above image is problematic as the Background image (004.jpg in the zip file provided above) for some unknown reasons comes up rotated. But if we open this same image in Photoshop it comes up properly in Portrait mode.

This image comes up properly as expected as the original psd file is in portrait mode and the background image (002-9x12.jpg) is also in portrait mode.
What must be the problem?
Please guide as to how to solve this problem.
TIA
Yogi Yang