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
 1 px line after 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
aleatprog Posted - Aug 04 2020 : 04:15:15
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
2   L A T E S T    R E P L I E S    (Newest First)
aleatprog Posted - Aug 05 2020 : 07:02:15
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
xequte Posted - Aug 04 2020 : 17:26:39
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