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
 [IEvolution] LayersFixRotations
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

gcsoft

Italy
22 Posts

Posted - May 29 2013 :  01:13:11  Show Profile  Reply
hi,
when I try to rotate an image by LayersFixRotation, the result is of poor quality, almost no case be considered for the property LayersRotationFilter. I use IEVolution.NET 4.1.2.
Here is the code I use:


IEImage imgFoto = new IEImage();
imgFoto.AutoUndo = false;
imgFoto.IOParams.PNG_Compression = 0;
imgFoto.LegacyBitmap = false;
imgFoto.ImageLocation = IEImage.Location.File;
imgFoto.LoadImage(fileImage);
imgFoto.LayersRotationFilter = AntialiasMode.Bilinear;
imgFoto.CurrentLayer.Rotate = livelloFoto.Rotation;
imgFoto.LayersFixRotations();


Could you help me?

Gregorio Carabino
software developer
http://www.gcsoft.it

fab

1310 Posts

Posted - Jun 04 2013 :  01:09:57  Show Profile  Reply
Hi,
I see you set LegacyBitmap = false (means: do not use DIB, for additional pixel formats), are you using a pixel format different than 24 bit RGB?
Go to Top of Page

gcsoft

Italy
22 Posts

Posted - Jun 05 2013 :  08:07:50  Show Profile  Reply
Image's format is ie24RGB.
Seems to occur only when l rotate the level 0.

Gregorio Carabino
software developer
http://www.gcsoft.it
Go to Top of Page

klausdoege

Germany
389 Posts

Posted - Jun 05 2013 :  10:59:02  Show Profile  Reply
Hello,
I have the same problem.
Here with the example " RotateLayers " of hicomponents generates.
The quality with the rotates is bad, particularly with straight lines. See exemple picture.

121.1 KB
Why?

Klaus
www.klausdoege.de
Go to Top of Page

fab

1310 Posts

Posted - Jun 06 2013 :  13:42:58  Show Profile  Reply
To improve performance antialias is disabled on rotating (and before LayersFixRotations).
To "finalize" rotation you have to call LayersFixRotations with LayersRotationAntialis=true and specifying a filter in LayersRotationFilter.

ImageEnView1.LayersRotationAntialias := true;
ImageEnView1.LayersRotationFilter := ierBilinear;
ImageenView1.LayersFixRotations();
ImageenView1.Update();
Go to Top of Page

klausdoege

Germany
389 Posts

Posted - Jun 07 2013 :  02:10:41  Show Profile  Reply
Yes that works out great.

105.45 KB
But what can I do, if I realize the rotation only per mouse?

Klaus
www.klausdoege.de
Go to Top of Page

klausdoege

Germany
389 Posts

Posted - Jun 09 2013 :  05:41:32  Show Profile  Reply
Hello,
here my solution, for all with the same problem.
If mouse uses: ImageEnView1.MouseInteract:=[miResizeLayers,miMoveLayers];

procedure TMainForm.ImageEnView1LayerNotify(Sender: TObject;
layer: Integer; event: TIELayerEvent);
begin
if event = ielRotated then
begin
ImageEnView1.LayersRotationAntialias := true;
ImageEnView1.LayersRotationFilter := TIEAntialiasMode(ierBilinear);
ImageenView1.LayersFixRotations();
ImageenView1.Update();
end;
end;

This works fine.

Klaus
www.klausdoege.de
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: