Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Friday, August 28, 2009 4:06:25 AM(UTC)

makumar  
makumar

Groups: Registered
Posts: 23


Hi,

I am using Leadtool Documentation V14.5 with Delphi 2006.
After opening an image (say bmp file of rectangular shape), I am using the following instruction to rotate it by 45 degrees:

LeadImage1.Rotate(27000, 1, RGB(0, 0, 255));
LeadImage1.AutoSetRects := True;
LeadImage1.ForceRepaint;

After above code, the image is rotated & blank area is filled with blue color.

Now, I again run the above code to rotate further by 45 degrees.
Image will be rotated, but the actual image size is continue decreasing & the remaining area is filled with blue.

Is there any way to increase the size of actual image , i.e. overlapping the blue area.

Thanks & Regards,
Manoj Kumar

 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Sunday, August 30, 2009 6:20:52 AM(UTC)

Basel  
Guest

Groups: Guests
Posts: 3,028

Was thanked: 2 time(s) in 2 post(s)

Manoj,
When you rotate the image 270 degrees, are you sure the filling color is used? It shouldn't be used because 270 degrees is a right angle, and no additional border area is needed.

In all cases, the total bitmap size is increasing, not decreasing. You are passing the value 1 for the flag, which means ROTATE_RESIZE. This causes the function to add the border (blue in your case) instead of cropping the corners.

The reason it's getting smaller on your screen is because you're probably fitting it in the control. This means as the image size increases, the zoom factor decreases.
 
#3 Posted : Sunday, August 30, 2009 7:56:43 PM(UTC)

makumar  
makumar

Groups: Registered
Posts: 23



Hi Basel,
Thanks for quick reply.
I am sorry. Its not 27000, its 13500.

The actual image becomes smaller  the remaining are is filled with blue color. Again rotating, will further reduces the actual size.

How I can omit that? How I can make make my rotated image to the actual size.?

Thanks once again.
Regards,
Manoj Kumar
 
#4 Posted : Monday, August 31, 2009 3:23:41 AM(UTC)

Basel  
Guest

Groups: Guests
Posts: 3,028

Was thanked: 2 time(s) in 2 post(s)

Manoj,

Yes, 135 degree will fill the additional border area.
Do you fit the image in the viewer? If yes, then as I mentioned, the image does not become smaller, only the zoom factor decreases which makes the image look smaller.
The added fill color is part of the image now.
In other words, you are fitting a BIG image in the same viewer. This causes the center part of it (the original rotated image) to be displayed at a smaller zoom factor.

Now, if you rotate again and also use the Resize flag, ANOTHER fill area will be added to the image, and the zoom factor will be even smaller.

In general, we recommend that you do NOT perform multiple rotations on the same image for the following 2 reasons:
1. Every time you rotate a new filling border will be added.
2. Most importantly, every time your rotate, the pixels of the image are distorted. When you rotate multiple times, the distortion is added and the image quality could become very bad.

You can always crop (remove) the added border area that results from multiple rotations. To do that, use the AutoTrim() function.

 
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2020, Yet Another Forum.NET
This page was generated in 0.050 seconds.