|
-
Apr 19th, 2025, 11:21 AM
#15
Re: Image crop
Final RC6 demo updated with the following:
- Basic UI that let's users set the crop rectangle values in TextBoxes.
- Basic UI that let's users load/save images via buttons.
- Moved to a Class that you can hook to any PictureBox (allowing you to implement any UI around it that you like).
- Improved performance dramatically by changing base image rendering to use CAIRO_FILTER_FAST instead of CAIRO_FILTER_GOOD. Negligible degradation in quality for the massive performance boost IMO, but feel free to adjust to your own preferences).
- Mouse over crop rect or crop rect resize handles now changes the mouse pointer for better Ux.
- Few other minor improvements/fixes.

Approximately 530 lines all-in for the main class+demo UI (just under 500 for the main class), and I wasn't particularly trying to be concise. Even better than LOC measure is that it only took ~4 hours to go from first thought to completed project...still hard (impossible?) to beat VB6+RC6 RAD for desktop apps, even in 2025!
Anyway, this is likely the last update for this demo as I think it provides enough to serve as a basis for any real-world projects that anyone might want to extend from it (or simply to use as reference/learning material).
Enjoy!
Source Code: ImageSel3.zip
Last edited by jpbro; Apr 19th, 2025 at 11:45 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|