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
 function Rotate (small angle turn)
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

brm121966

USA
64 Posts

Posted - Aug 17 2022 :  09:40:08  Show Profile  Reply
Hello.
I use the image rotation function Proc.Rotate(0.1) and look at the result;
After 10-100 applications, the image rotates and I see the result, but the result is terrible. The picture is corrupted. The picture is blurry when using ierFast. Other TIAntiAliasMode methods also give bad results.
In the examples, the effect is the same.
Are there options for the correct operation of the function.
Thank you.
P.S. FastStone rotate image by 0.1 degree 10-100 times correctly.

Rudolf


xequte

38611 Posts

Posted - Aug 22 2022 :  14:49:08  Show Profile  Reply
Hi Rudolf

You can't rotate the same image many times as rounding errors will accumulate (except when done at 90 deg).

You have two options:

1. Upcoming version supports an effects chain, so you can just update the effects chain rotation amount

2. Each time you need to rotate, reset to the original unrotated image and rotate that instead (e.g. using Undo)

Nigel
Xequte Software
www.imageen.com
Go to Top of Page

brm121966

USA
64 Posts

Posted - Aug 25 2022 :  07:30:37  Show Profile  Reply
Thanks.


Rudolf
Go to Top of Page

xequte

38611 Posts

Posted - Aug 25 2022 :  16:17:45  Show Profile  Reply
Hi Rudolf

This is the method to do with the EffectsChain functionality of 11.3.0:

// Progressively increase the image rotation by 1 deg. using an image chain (so there is no quality lost)
ImageEnView1.IEBitmap.EffectsChain.Enabled := True;
idx := ImageEnView1.IEBitmap.EffectsChain.EffectToIndex( peRotate );
if idx = -1 then
  idx := ImageEnView1.IEBitmap.EffectsChain.Add( peRotate );
ImageEnView1.IEBitmap.EffectsChain.Items[idx].Rotate_Angle := ImageEnView1.IEBitmap.EffectsChain.Items[idx].Rotate_Angle + 1;
ImageEnView1.IEBitmap.EffectsChain.Items[idx].Rotate_Antialias := ierBicubic;
ImageEnView1.Update();  // Must call update after manually setting properties


Nigel
Xequte Software
www.imageen.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: