You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have encountered an issue with the .Resize() function in our software. It appears that, starting from version 2.88.0, images lose their ICC profile after passing through this function. Prior to version 2.88.0, this functionality was working as expected, including in version 2.80.4 and earlier.
Code
We're using images on this site. All the test cases were negatives using the "newer" versions
using SkiaSharp;try{// Load an image with an ICC profileusingSKBitmaporiginalImage= SKBitmap.Decode("pathToImage.jpg");// Resize the imageintnewWidth=200;intnewHeight=200;// Resize the original image using SkiaSharpusingSKBitmapskiaResizedBitmap= originalImage.Resize(new SKImageInfo(newWidth, newHeight), SKFilterQuality.High);varms=new MemoryStream();
skiaResizedBitmap.Encode(ms, SKEncodedImageFormat.Png,100);
ms.Position =0;
File.WriteAllBytes("resized_image.jpg", ms.ToArray());}catch(Exceptionex){
Console.WriteLine("An error occurred: "+ ex.Message);}
Expected Behavior
All ICC tests cases should be positives when resizing with SkiaSharp.
Actual Behavior
All ICC test cases are actually negatives when using .Resize() with SkiaSharp
Version of SkiaSharp
2.88.3 (Current)
Last Known Good Version of SkiaSharp
2.80.x (Deprecated)
IDE / Editor
Other (Please indicate in the description)
Platform / Operating System
Windows
Platform / Operating System Version
No response
Devices
No response
Relevant Screenshots
No response
Relevant Log Output
No response
Code of Conduct
I agree to follow this project's Code of Conduct
The text was updated successfully, but these errors were encountered:
Since we still got the same issues, I've prepared 4 solutions ( 2 with .png and 2 with .jpg images). One used the 2.80.2 version and the other used the 2.88.8 version ( it could be any version later than 2.80.4). They both use the same code expressed in the following issue #2784.
Description
We have encountered an issue with the
.Resize()
function in our software. It appears that, starting from version2.88.0
, images lose their ICC profile after passing through this function. Prior to version 2.88.0, this functionality was working as expected, including in version2.80.4
and earlier.Code
We're using images on this site. All the test cases were negatives using the "newer" versions
Expected Behavior
All ICC tests cases should be positives when resizing with SkiaSharp.
Actual Behavior
All ICC test cases are actually negatives when using
.Resize()
with SkiaSharpVersion of SkiaSharp
2.88.3 (Current)
Last Known Good Version of SkiaSharp
2.80.x (Deprecated)
IDE / Editor
Other (Please indicate in the description)
Platform / Operating System
Windows
Platform / Operating System Version
No response
Devices
No response
Relevant Screenshots
No response
Relevant Log Output
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: