ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Best way to Rotate an image
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

AndyColmes

USA
351 Posts

Posted - May 04 2012 :  18:14:20  Show Profile  Reply
What is the best way to rotate an image? I have to rotate an image using the pre-defined angles like 90, 180, 270. But sometimes, the image gets cropped off due to insufficient canvas size.

Thanks.

xequte

39097 Posts

Posted - May 04 2012 :  20:50:08  Show Profile  Reply
Hi

Do you have an image in an ImageEnView?

You can use:

ImageEnView1.Proc.Rotate(90, True);
ImageEnView1.Update;


Or if you are happy to work with directly with the file you can use the lossless functions:

http://www.imageen.com/help/Jpeg%20lossless%20transformations%20functions.html

Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page

AndyColmes

USA
351 Posts

Posted - May 06 2012 :  10:37:49  Show Profile  Reply
I do have an image in a TImageEnView. But sometimes when the canvas size is not large enough, rotation can crop off edges of the image. Is there a way to avoid that or maybe a way to automatically resize the canvas (I guess the bitmap height and width) to fit the new rotated image?

Thanks.
Go to Top of Page

fab

1310 Posts

Posted - May 06 2012 :  14:21:53  Show Profile  Reply
Maybe the resulting image doesn't fit in the TImageEnView sizes. Anyway it isn't cropped, just you don't see it completely.
Call ImageEnView.Fit() or adjust Zoom manually to see the whole image.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: