How do I crop an image and set its brightness and contrast

50 views
Skip to first unread message

CJ

unread,
Oct 12, 2010, 12:12:18 PM10/12/10
to MetaDraw Developers Group
I recently inherited a VB.Net project that uses MetaDraw 2 for .Net
and I have a couple of questions. Can someone give me a snippet of
code that will crop an image. I also need an example of how to adjust
the brightness and contrast of an image. Since I can't find any
documentation on Benett-Tec's website, I thought I would try this
forum for help.

Thanks in advance!

Bennet-Tec Staff

unread,
Mar 15, 2013, 2:40:11 PM3/15/13
to metadraw-for...@googlegroups.com

While there is no one step method to do this, definitely you can
use MetaDraw  for cropping images.  

Cropping the image in MetaDraw is be done by setting 4 properties
( ClipLeft, ClipTop, ClipWidth, ClipHeight ) to specify  the location
of the top left corner, and the height and width of the crop area.  
 
Potentially you might allow a user to draw a rectangle
around the desired area and use this to determine the crop boundaries.
 
You would then set another property ( ExportOptions) to specify that when
reading the  image it should be cropped to those specifications.
At this point you can set the Picture property to itself.
This would replace the original image with the cropped image.   
Or you could save the cropped image to a file or database using
the SavePicture method.
 
Reply all
Reply to author
Forward
0 new messages