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
 Layer 0 cropping is having problem in IE 9.2
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

yogiyang

India
725 Posts

Posted - Oct 05 2020 :  10:37:35  Show Profile  Reply
Hello Nigel,

The crop tool is still having problems.

When we crop Layer 0 (background) in a multi layer file this is what I am getting in the demo CropTool.

I have not made any changes to the code of the demo except for getting it to load PSD files with layers.

The problems are:
  • Layer 0 after cropping is getting displaced, towards right and down wards
  • Because of this probably all the layers are not getting copped properly


Before Cropping:


After Cropping:


Any idea as to how to solve this problem.

TIA


Yogi Yang

xequte

38202 Posts

Posted - Oct 06 2020 :  17:01:59  Show Profile  Reply
Please upload your test file...

Nigel
Xequte Software
www.imageen.com
Go to Top of Page

yogiyang

India
725 Posts

Posted - Oct 07 2020 :  09:06:34  Show Profile  Reply
Hello Nigel,

Please download the file using following link:
https://mega.nz/file/fshVVAqZ#RpW_LiAB44RTL8tQnqBHRZXDE4Ijt_AHD0ztlna1vv0

TIA


Yogi Yang
Go to Top of Page

xequte

38202 Posts

Posted - Oct 11 2020 :  17:54:32  Show Profile  Reply
Hi Yogi

Some of your layers have Cropped = True, some do not.

https://www.imageen.com/help/TIELayer.Cropped.html

This controls whether layers outside the area of the background layer are visible or not.

Nigel
Xequte Software
www.imageen.com
Go to Top of Page

yogiyang

India
725 Posts

Posted - Oct 12 2020 :  01:18:50  Show Profile  Reply
Hello Nigel,

Thanks for the tip. The parts that I have marked in my first post are not showing up but the Image is getting displaced.

If you observe the screen shot in my first post you will see that the image is displaced and we can see the Background style is at one location and the actual image is at another location.

I have changed the code of Image Open button click event as follows:

procedure TForm1.btnOpenClick(Sender: TObject);
var
  sFilename: string;
  I: Integer;
begin
  sFilename := ImageEnView1.IO.ExecuteOpenDialog();
  if sFilename <> '' then
  begin
    ImageEnView1.IO.Params.PSD_LoadLayers := True;
    ImageEnView1.IO.Params.PSD_ReplaceLayers := True;
    ImageEnView1.IO.LoadFromFile( sFilename );
    ImageEnView1.Fit( False ); 
    StartCropping( False );

    ImageEnView1.LayersCurrent := 0;

    ImageEnView1.LayersCropped := True;

    for I := 0 to ImageEnView1.LayersCount - 1 do
    begin
      ImageEnView1.Layers[I].Cropped := True;
    end;
  end;
end;


TIA


Yogi Yang
Go to Top of Page

xequte

38202 Posts

Posted - Oct 13 2020 :  23:20:36  Show Profile  Reply
Hi Yogi

ImageEn does not adjust the position of the layer 0 after cropping. You might want to call:

ImageEnView1.LayersRepositionAll( moveX, moveY );

https://www.imageen.com/help/TImageEnView.LayersRepositionAll.html


Nigel
Xequte Software
www.imageen.com
Go to Top of Page

yogiyang

India
725 Posts

Posted - Oct 14 2020 :  01:10:07  Show Profile  Reply
Hello Nigel,
 
ImageEn does not adjust the position of the layer 0 after cropping. You might want to call:

ImageEnView1.LayersRepositionAll( moveX, moveY );

In this case what value have I to pass in moveX & moveY?

Will this move the Background Layer also? I am asking this because this does not work as documented:
ImageEnView1.CropTool.Enact();
ImageEnView1.LayersRepositionAll( IELayer_Pos_HCenter, IELayer_Pos_VCenter, False, False, True );


Please check attached screen shot again:




TIA


Yogi Yang
Go to Top of Page

xequte

38202 Posts

Posted - Oct 14 2020 :  02:23:47  Show Profile  Reply
Thanks Yogi,

Please email me for a fix.

Nigel
Xequte Software
www.imageen.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: