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
 Cropping problem in - CropSel and Crop

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 - Jul 27 2020 : 07:50:19
Hello,

I have observed that CropSel and Crop are not working properly when there are multiple layers in and image.

When I say not working properly means that it is cropping the image from top left of Layer[0] and not where marquee selection is present.

Please check these screen shots:

CurrentLayer is set to 0. Which is the bottom most layer. Please look at selection in the screen shot...


After calling ImageEnView1.Proc.CropSel(False);


I also tried this code:
ImageEnView1.Proc.Crop(ImageEnView1.SelectedRect.X, ImageEnView1.SelectedRect.Y, ImageEnView1.SelectedRect.X + ImageEnView1.SelectedRect.Width, ImageEnView1.SelectedRect.Y + ImageEnView1.SelectedRect.Height);


But this also does not work.

I am using IE 9.1.1.

Please help in solving this problem.

TIA


Yogi Yang
11   L A T E S T    R E P L I E S    (Newest First)
yogiyang Posted - Sep 11 2020 : 00:11:35
Hello kturkay,

Actually I am waiting for the next update of IE to be released. I think it will be solved in that update.

TIA


Yogi Yang
kturkay Posted - Sep 10 2020 : 07:12:54
think I faced that issue. did it manually.

used "LayersDrawTo" function instead of LayersSaveMergedTo
and ofsure Proc.Crop(....
xequte Posted - Aug 03 2020 : 02:08:37
Hi Yogi

You can email me for a fix for that.



Nigel
Xequte Software
www.imageen.com
yogiyang Posted - Aug 01 2020 : 00:57:40
Hello Nigel,

Even doing this does not solve this problem as the BG Layer moved to 0,0

TIA


Yogi Yang
xequte Posted - Jul 30 2020 : 23:02:55
Hi Yogi

All your layers have Cropped=True, so they are hidden because they are outside the background layer.

After loading call:

    for i := 1 to ImageEnView1.LayersCount - 1 do
      ImageEnView1.Layers[i].Cropped := False;


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

Nigel
Xequte Software
www.imageen.com
yogiyang Posted - Jul 30 2020 : 03:18:01
Please let me know when you have download the files so that I can remove them.


Yogi Yang
yogiyang Posted - Jul 29 2020 : 07:17:09
As the file is very large, I am not able to attach it here. Please download it from here:
https://mega.nz/file/alRwFSwR#U5cEQSWiauo4L9qedwb6oYvzQ4iSsVP8_QF-GlGZhzg

One more file: https://mega.nz/file/ClwVQL4Z#Ajh6gY92d3tiCL-i38SrgsUCvNnxDkB2VPAtOKrN1d4


Yogi Yang
xequte Posted - Jul 28 2020 : 15:48:12
Please give me a link to this PSD.

Nigel
Xequte Software
www.imageen.com
yogiyang Posted - Jul 28 2020 : 01:50:24
Hello,

Please open the demo project: Demos\ImageEditing\CropTool

And change the code of btnOpenClick to following:
procedure TForm1.btnOpenClick(Sender: TObject);
var
  sFilename: string;
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(  );

    ImageEnView1.LayersCurrent := 0;
    StartCropping( True );
  end;
end;


Now draw the area to be cropped and then click on the btnApplyCrop.

The are you select for Cropping should be in the middle or toward the right side of the image.

Here are the screen shots of before and after:








Yogi Yang
xequte Posted - Jul 27 2020 : 20:20:31
Hi Yogi

Can you give me the steps to reproduce the relocation issue in one of our demos?



Nigel
Xequte Software
www.imageen.com
yogiyang Posted - Jul 27 2020 : 08:31:48
Hello,

On further testing I found that Layer[0] does get cropped properly but all the other layers seems to get relocated.

This problem is also there in CropTool also.

How can we prevent this from happening?

TIA


Yogi Yang