This is a migrated thread and some comments may be shown as answers.

Predefine rectangle in crop tool

2 Answers 120 Views
ImageEditor
This is a migrated thread and some comments may be shown as answers.
Mike
Top achievements
Rank 2
Mike asked on 28 Jul 2011, 03:23 PM
Hi,

just was playing around with the new image editor. i'm using a custom ui like the one in the demo (the one with the image of the baseball player) and i was wondering if there is a way to set the height and width of the cropping rectangle to a specific size.i want to force the user to crop his images to a predifend size or at least aspect ratio. similar to the way you assign contact images on a iphone.

and one more question, how can a write the RadBitmap to a byte array for storing it in a DB?
UPDATE: OK, forget about the DB thing, just found the
Telerik.Windows.Media.Imaging.FormatProviders.BmpFormatProvider 

best regards
Michael

2 Answers, 1 is accepted

Sort by
0
Accepted
Ivailo Karamanolev
Telerik team
answered on 02 Aug 2011, 10:26 AM
Hello Michael,

Restricting the crop tool to an aspect ratio or a fixed size is currently not supported, however, you can implement your own tool, based on the current CropTool. The current implementation is available in the source code package along with the other controls.
As for saving the image to the DB using PngFormatProvider is recommended instead of BmpFormatProvider as the former is also lossless, but results in much smaller images.

All the best,
Ivailo
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

0
Mike
Top achievements
Rank 2
answered on 03 Aug 2011, 07:07 AM
OK, thanks!
Tags
ImageEditor
Asked by
Mike
Top achievements
Rank 2
Answers by
Ivailo Karamanolev
Telerik team
Mike
Top achievements
Rank 2
Share this question
or