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
 Question of cropping Automatically.

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
jocker94 Posted - Aug 23 2016 : 00:33:21
Hi, Everyone,

I need to crop some image in Automatically.

The red rectangle is the target.

the red rectangle will large or small as the Yellow rectangle's size.

Attached is the sample.

Is possible with your Imageprocess component in Delphi XE2 ?

And how it can be invoke the code?

Regard.


1   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Aug 23 2016 : 19:51:49
Hi

There are autocropping methods in ImageEn:

http://www.imageen.com/help/TImageEnProc.AutoCrop.html

But they assume a background of fairly consistent color.


In your situation you are probably going to need to iterate throught the scanlines of your image to find the first top, first left, last bottom and last right red pixels.

Then pass these values to TImageEnProc.Crop():

http://www.imageen.com/help/TImageEnProc.Crop.html

Nigel
Xequte Software
www.xequte.com
nigel@xequte.com