Reputation: 4555
I need a simple component to do image crop, to use inside an option where user must select an image, photo, or logo to represent them.
I already done some search with Google but found nothing good.
I would something with source code.
Upvotes: 3
Views: 2667
Reputation: 703
Try ImageEn from http://www.hicomponents.com/main/. It does what you want and a lot more. It is free, but not sure if you can get source with it.
Upvotes: 3
Reputation: 2826
A TRect, DrawFocusRect and some handling of OnMouseDown, OnMouseMove, OnMouseUp for allowing user interaction to draw the cropping frame
and
BitBlt to do the actual cropping after the user is happy with the selection he made.
And look, there is an example which uses those same ideas: http://exampledelphi.com/delphi.php/tips-and-tricks/crop-image-with-drag-the-mouse/.
God bless!
Upvotes: 3