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

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Saved image gets stretched and Layers rotated [:0]

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
yogiyang Posted - Oct 07 2017 : 10:09:06
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
2   L A T E S T    R E P L I E S    (Newest First)
yogiyang Posted - Oct 09 2017 : 02:38:31
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
xequte Posted - Oct 08 2017 : 19:33:57
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