Repository navigation
Regression in TIF image loading #2149
Description
Activity
The commit causing this seems to be: 57349fd
Not sure why the tests did not catch this one.
@brianpopow Is it an easy fix? If so, can you let me know when you push the update? I'm working on a time-sensitive project.
I’ll create a PR later.
I think we need to clear the destination for the decompressed data here to fix it:
ImageSharp/src/ImageSharp/Formats/Tiff/Compression/Decompressors/T6TiffCompression.cs
Line 54 in a194b9e
int height = stripHeight; The issue only happens when there are multiple strips in the image. The current test images only have one strip.
Here is a test image replicating the issue:
Group4CompressionWithStrips.zipTIFF Directory at offset 0x1058 (4184) Image Width: 205 Image Length: 305 Resolution: 96, 96 pixels/inch Bits/Sample: 1 Compression Scheme: CCITT Group 4 Photometric Interpretation: min-is-white FillOrder: msb-to-lsb Orientation: row 0 top, col 0 lhs Samples/Pixel: 1 Rows/Strip: 100 Planar Configuration: single image plane Software: IrfanView- added 2 commits that reference this issue
on Jun 12, 2022 I have opened a PR to fix this: #2150
Thank you so much!
I'm not sure how imageSharp manages the PR > commit > beta build process but I'll check in on the MyGet page throughout the day and hopefully a new build will appear soon!
Reacted by Brian PopowI'm not sure how imageSharp manages the PR > commit > beta build process but I'll check in on the MyGet page throughout the day and hopefully a new build will appear soon!
There will be a new MyGet beta version, once the PR is merged to the main branch.
Thanks! Do the PRs merge automatically or manually? I noticed that the PR says it is unable to merge.
Thanks! Do the PRs merge automatically or manually? I noticed that the PR says it is unable to merge.
Its manually, another one from the ImageSharp team needs to review the changes first.
@TonyValenti there is now a
alpha.0.20version with the fix.@brianpopow Thank you so much! I'm testing it now.
Prerequisites
DEBUGandRELEASEmodeImageSharp version
3.0.0-alpha.0.19
Other ImageSharp packages and versions
2.1.2
Environment (Operating system, version and so on)
Windows 11 x64
.NET Framework version
6.0.5
Description
@brianpopow recently made a number of performance enhancements to TIF images, however, I believe he introduced a regression that occurs when processing certain tiff files.
Steps to Reproduce
Run this with ImageSharp 2.1.2 and the PNG file looks identical to the TIF.
Run with the latest beta and the TIF shows duplicated, smudged content as shown here.
Images
@brianpopow - I am not comfortable publicly sharing the source image at this time. Can you please email [email protected] and I will provide the image to you?