Andrea Giudiceandrea Posted September 20, 2022 Posted September 20, 2022 (edited) A 24 bits TIFF file (3 samples per pixel: R,G,B) which correctly contains 3 values for the SampleFormat TIFF tag (one for each of the 3 samples), after being edited and saved by paint.net 4.3.12 as a 32 bits TIFF file (4 samples per pixel: R,G,B,A) still incorrectly contains the same 3 values of the sampleformat TIFF tag instead of the correct 4 values (one for each of the 4 sample). So it seems paint.net fails to update the sampleformat TIFF tag to 4 values (i.e. adding the 4th value for the 4th sample per pixel). This lead to the impossibility to open the TIFF file with some image processing software like GIMP, which throws the error: Not a TIFF image or image is corrupt / Incorrect count for SampleFormat; or GIS software like QGIS which thrown the error: TIFFReadDirectory:Incorrect count for "SampleFormat". To replicate the issue: - open the "sample.tiff" 24 bit file (contained in the attached "sample.zip" file) with paint.net - save the image as a 32 bit tiff file While the original "sample.tiff" 24 bit file can be opened by e.g. GIMP or QGIS without issue, the new 32 bit file saved by paint.net cannot be opened by e.g. GIMP or QGIS. sample.zip Edited September 20, 2022 by Andrea Giudiceandrea Quote
BoltBait Posted September 20, 2022 Posted September 20, 2022 @null54 have you seen this? Quote Download: BoltBait's Plugin Pack | CodeLab | and a Free Computer Dominos Game
Rick Brewster Posted September 20, 2022 Posted September 20, 2022 @BoltBait, TIFF is a built-in file format, not one of @null54's bundled plugins @Andrea Giudiceandrea, I'll take a look at this for the 5.0 release. Looks like SampleFormat is just a regular EXIF tag, so it should be easy enough to set the right value. If there's a 4.3.13 release, which would arrive much sooner than 5.0, I may be able to get it in there as well, but I currently don't have plans for that. (doesn't mean it won't happen though) 1 Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html
null54 Posted September 20, 2022 Posted September 20, 2022 @Andrea Giudiceandrea Paint.NET uses the TIFF support that is built-in to the OS, so this would be a bug in Windows Imaging Component. 6 hours ago, Andrea Giudiceandrea said: So it seems paint.net fails to update the sampleformat TIFF tag to 4 values (i.e. adding the 4th value for the 4th sample per pixel). That appears to be the issue. The libtiff tiffinfo utility gives the same error as GIMP, and the tiffdump utility shows the incorrect SampleFormat tag. 9 minutes ago, Rick Brewster said: I'll take a look at this for the 5.0 release. Looks like SampleFormat is just a regular EXIF tag, so it should be easy enough to set the right value. It is a TIFF tag, EXIF is based on TIFF. Quote Plugin Pack | PSFilterPdn | Content Aware Fill | G'MIC | Paint Shop Pro Filetype | RAW Filetype | WebP Filetype The small increase in performance you get coding in C++ over C# is hardly enough to offset the headache of coding in the C++ language. ~BoltBait
BoltBait Posted September 20, 2022 Posted September 20, 2022 4 hours ago, Rick Brewster said: @BoltBait, TIFF is a built-in file format, not one of @null54's bundled plugins Sorry, didn't mean to step on anyone's toes... he's just really good at root-causing filetype issues and thought he might help you by researching this one. 1 Quote Download: BoltBait's Plugin Pack | CodeLab | and a Free Computer Dominos Game
Rick Brewster Posted September 20, 2022 Posted September 20, 2022 No toes were stepped on, no worries Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html
Rick Brewster Posted November 27, 2022 Posted November 27, 2022 Okay this should be fixed in the next build of PDN 5.0 Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.