ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Saved image gets stretched and Layers rotated [:0]
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

yogiyang

India
727 Posts

Posted - Oct 07 2017 :  10:09:06  Show Profile  Reply
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

xequte

39053 Posts

Posted - Oct 08 2017 :  19:33:57  Show Profile  Reply
Hi Yogi

Does changing the following value before loading affect the issue:

ImageEnView1.IO.Params.EnableAdjustOrientation

Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page

yogiyang

India
727 Posts

Posted - Oct 09 2017 :  02:38:31  Show Profile  Reply
Yes it does.

But that is not the case I am trying to make.

If JPEG_EnableAdjustOrientation is false then the image should come as it is and should be get stretched. It is getting stretched because the dimensions reported are as per the actual rotation. And on top of it the Layers are getting rotated!



Yogi Yang
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: