Changed behaviour of RotateAngleBackColor

Discussions about image processing and document imaging.
Post Reply
Heslacher
Posts: 2
Joined: Tue Oct 12, 2021 4:55 pm

Changed behaviour of RotateAngleBackColor

Post by Heslacher » Wed Oct 13, 2021 7:58 am

FYI, in case anyone has stumbled across the same problem as me:
So far we were using version 14.0.77 of the GdPicture Toolkit.
The behavior of the RotateAngleBackColor function has changed, at least since version 14.1.121, so that an image with a bit depth of 24-bit has a bit depth of 32-bit after execution of the function.
This behavior still exists in version 14.1.135.

User avatar
Fabio
Posts: 173
Joined: Thu Aug 27, 2020 9:57 am

Re: Changed behaviour of RotateAngleBackColor

Post by Fabio » Thu Oct 14, 2021 11:58 am

Hello,

I tested it with the GdPicture latest release and everything seems alright.
Here the code I used to test it:

Code: Select all

Dim oImaging As New GdPictureImaging
Dim myImage = oImaging.CreateGdPictureImageFromFile("D:\24bits.jpeg")
oImaging.RotateAngleBackColor(myImage, 90, System.Drawing.Color.Beige)
oImaging.SaveAsJPEG(myImage, "D:\32bits.jpeg")
Did I miss something? If not, could you test it through our last version?

With best,
Fabio

Heslacher
Posts: 2
Joined: Tue Oct 12, 2021 4:55 pm

Re: Changed behaviour of RotateAngleBackColor

Post by Heslacher » Thu Oct 14, 2021 2:02 pm

Hello,

we have used 14.0.77 for our solution. In this version, if you load an image with 24-bit into GdPicture the resulting image after calling RotateAngleBackColor() will keep the 24-bit. Thats what we see as expected behaviour.
Now with version 14.1.135 if you load an image 24-bit into GdPicture the resulting image after calling RotateAngleBackColor() will result in a 32-bit image. But this doesn't always happen. There seems to be some more side effects from this method. I tested your example with 90 as angle and the method correctly returns 24-bit. Then I tested your example with 91 as angle and the method incorrectly returns 32-bit.

See example below

Code: Select all

            
GdPictureImaging gdp = new GdPictureImaging();

int imageId = gdp.CreateNewGdPictureImage(100, 100, 24, Color.White);

Console.WriteLine(gdp.GetBitDepth(imageId));
gdp.RotateAngleBackColor(imageId, 91, Color.White);
Console.WriteLine(gdp.GetBitDepth(imageId));

Console.ReadLine();
gdp.ReleaseGdPictureImage(imageId);

User avatar
Fabio
Posts: 173
Joined: Thu Aug 27, 2020 9:57 am

Re: Changed behaviour of RotateAngleBackColor

Post by Fabio » Fri Oct 15, 2021 10:34 am

Hello,

Thank you very much for the explanation. I reproduced the issue and I created a dev ticket on our side to correct it as soon as possible.
I'll keep you posted on this post about any updates!

With best,
Fabio

User avatar
Fabio
Posts: 173
Joined: Thu Aug 27, 2020 9:57 am

Re: Changed behaviour of RotateAngleBackColor

Post by Fabio » Tue Nov 02, 2021 10:04 am

Hello,

The issue has been fixed and will be available on our next minor release.
Thank you for your patience, I'll write you through this post when the release will be available.

With best,
Fabio

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest