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
 AutoCrop Issue

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
jeffp Posted - Jan 10 2025 : 16:18:51
I'm using this procedure to do an AutoCrop of an image

FViewer.Proc.AutoCrop(5, clNone, True);

What I can't understand is why it works on the attached "CropSuccess.tif" and NOT on the "CropFile.tif". They are essentially the same file.

Any help here would be welcome.


attach/jeffp/2025110161755_CropSuccess.tif

attach/jeffp/2025110161810_CropFail.tif

Here they are in zip format

attach/jeffp/2025110162020_Crop.zip
98.39 KB

jp
5   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Jan 12 2025 : 19:08:27
Yes, it works for me. Your code above gives me an image that is 535x923.

Please ensure you are using the beta code, and not your older DCU files.



Nigel
Xequte Software
www.imageen.com
jeffp Posted - Jan 11 2025 : 17:44:25
I installed the beta code, but the CropFail.tif still does not crop down to how CropSuccess.tif does.

What are you getting when you run both files through your code?

I'm using

FViewer.Proc.AutoCrop(10, clNone, True, False, 0.001);



jp

attach/jeffp/2025111174655_CropResults.zip
167.22 KB
xequte Posted - Jan 11 2025 : 15:03:34
Hi Jeff

I've emailed it to you.

Here are some examples


// Remove the black border from a scanned document
ImageEnView1.IO.Acquire();
ImageEnView1.Proc.AutoCrop(10, CreateRGB(0, 0, 0) );


// Remove the black border from a scanned document, but ignore any isolated pixels
ImageEnView1.IO.Acquire();
ImageEnView1.Proc.AutoCrop(10, CreateRGB(0, 0, 0), True, False, 0.001 );


Nigel
Xequte Software
www.imageen.com
jeffp Posted - Jan 11 2025 : 12:34:40
Yes I would the beta. Where do I email you for it?

jp
xequte Posted - Jan 10 2025 : 19:05:02
Hi Jeff

It is failing because there are black pixels at 2488,2748. However in the current beta we have added a threshold parameter to avoid isolated pixels like this. You can email me for it.

Nigel
Xequte Software
www.imageen.com