Results 1 to 12 of 12

Thread: cCropper: Simple, "Smart" RC6/Cairo Image Cropping Class

Threaded View

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Aug 2010
    Location
    Canada
    Posts
    2,897

    cCropper: Simple, "Smart" RC6/Cairo Image Cropping Class

    cCropper is a small and fast VB6/RC6 class designed to make image cropping easy, and to allow you to add image cropping to your VB applications (nearly) effortlessly.

    In addition to being a useful stand-alone class, the code has also been thoroughly commented, making it useful as learning material for RC6/Cairo graphics features and functionality.

    Features:

    • UI Mode:
      Let users visually select, move, and resize crop areas with the mouse.

    • Programmatic Mode:
      Define crop rectangles and process images entirely through code.

    • Format Support:
      Load and save PNG, JPEG, and BMP files.

    • "Smart" File Size Control:
      Automatically resize files to stay near a target maximum byte size - perfect for uploads and email attachments.

    • Image Size Control
      Define the maximum pixel width/height for your cropped image - useful for generating thumbnails.



    Screenshot:

    Name:  2025-04-20_13-06-57.jpg
Views: 1649
Size:  31.2 KB


    Notes

    Requires the RC6 library.


    Source Code:

    RC6CairoImageCropper4.zip

    (Includes demo image which accounts for most of the file size - source code is < 50kb)


    Enjoy!
    Last edited by jpbro; Apr 24th, 2025 at 03:57 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width