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
 1 px line after crop
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

aleatprog

122 Posts

Posted - Aug 04 2020 :  04:15:15  Show Profile  Reply
Hi,

after cropping and saving, a white line appears at one of the borders of the saved image (PNG, JPG). In case of a horizontal crop the white line is at the right border of the image, in case of a vertical crop at its bottom.
The line doesn't appear in the ImageEnView.

In order to avoid the line, I like to specify the BitmapPolygon coordinates in the crop function, e.g.:

ImageEnView1.CropTool.Enact(x1, y1, x2 -1, y2 -1);

Now, after showing the CropGrid on the image, an user could modify its position manually. How do I get the current BitmapPolygon coordinates in order to decrease the x2 and y2 values before cropping?

Al

xequte

38180 Posts

Posted - Aug 04 2020 :  17:26:39  Show Profile  Reply
Hi Al

I can't reproduce the border issue in the CropTool demo (with 9.1.1). Can you give me the exact steps.

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

aleatprog

122 Posts

Posted - Aug 05 2020 :  07:02:15  Show Profile  Reply
Hi Nigel,

my mistake. I set the BitmapPolygon rect(0, 0, bmp.width, bmp.height) instead of rect(0, 0, bmp.width -1, bmp.height -1). In fact, if the grid is drawn manually inside the image, the behaviour is correct in my tool as it is in the CropTool demo, thus no white line will be added. I just corrected my app and it works fine now.

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