-
-
Notifications
You must be signed in to change notification settings - Fork 851
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SixLabors create an invalid file after conversion #2300
Comments
could there be a rouge null byte in the header somewhere that causes paint to freak out... and could posibly be the cause on the s3 stream failing too when it reaches that byte? |
In the XMP chunk header? Yeah maybe. Odd that s3 would parse that far though. |
Thanks a lot for a quick answer. |
That doesn’t reflect what I am seeing. EXIF works fine for me. |
I'll take a look, something is very odd. |
That's strange but ImageSharp writes significantly less metadata after reencoding:
Well, deleting APP13 marker solves this issue, so actual EXIF metadata is not affected. As far as I know APP13 can be 'referenced' from APP1 segment, given that ImageSharp does truncate APP1 segment in this case - I suppose stated problem could be caused by breaking this reference. I debugged this image decoding and found out that APP13 marker is not fully decoded. I hadn't really checked any of the metadata-related code, is app13 photoshop metadata decoding fully supported? Yet another interesting detail is that given image contains thumbnail in APP1 marker which ImageSharp currently doesn't support and doesn't write back which possibly could mess up APP13 marker. |
@br3aker I tried set up null IPTC profile and everything works to me. |
There's definately something wrong here, even though IPTC profile in APP13 segment from re-encoded image lost a lot of data - it is valid. No 'standard' metadata software reports any errors but Paint fails? That's strange. If anybody have access to Photoshop - please re-save given image re-encoded by ImageSharp and post resulting image here (so we can inspect whether IPTC metadata is resaved by PS), if everything works there - I'd suggest that there's a bug in Paint. |
I created a thread in Paint.Net community, maybe there we will have an answer |
Wrong destination - Paint.NET and MS Paint are different things :P |
I'm going to close this. Following the link to the Paint.NET support channels it looks like everything but MS Paint is absolutely happy with the encoded image. That suggests the issue is with MS Paint. |
Prerequisites
DEBUG
andRELEASE
modeImageSharp version
3.0.0-alpha.0.65
Other ImageSharp packages and versions
3.0.0-alpha.0.65
Environment (Operating system, version and so on)
Windows\Linux
.NET Framework version
6
Description
For version 65 of nightly sixlabors package we've met issue with image conversion
We take original image from resources and convert it without options by sixlabors to jpg
Result image in brokenImageModel.jpg file can be opened in MS Paint but cannot be edited or saved properly
it can cause failures on s3 or cdn storages during upload with "File signature doesn't match" exception
Steps to Reproduce
or run code below
Images
The text was updated successfully, but these errors were encountered: