Comment on Image upload error?
threelonmusketeers@sh.itjust.works 1 month agoThanks for the info! The file extension is png.
Comment on Image upload error?
threelonmusketeers@sh.itjust.works 1 month agoThanks for the info! The file extension is png.
InEnduringGrowStrong@sh.itjust.works 1 month ago
Would you mind sending me that file through another means so I can test what’s happening?
Whatever file host, matrix, email, etc.
Thanks
threelonmusketeers@sh.itjust.works 1 month ago
Thanks! I just sent it on matrix.
InEnduringGrowStrong@sh.itjust.works 1 month ago
Got it.
Your PNG contains extra data after the PNG’s IEND marker which pict-rs probably errors on.
Your images aren’t stored as-is, among other things, their metadata is stripped so people don’t unwittingly share their geolocation, etc.
It rewrites the file in the process, but in this case doesn’t know what to do with the non png compliant data appended at the end.
Here’s a fixed version of your image that uploads fine.
Image
Using
pngcheck -vf
on the original image will give you the starting hex offset (0x10fc31) of that invalid chunk of data, which can then be browsed with whatever hex editor.I haven’t investigated that extra data much.
It might be part of a ‘capture the flag’ game, or not.
The fixed image is just the first bytes of the file upto that invalid extra chunk.
threelonmusketeers@sh.itjust.works 1 month ago
Wow, that’s some amazing digital detective work!
Huh, interesting!
If you would indulge me, I have a few additional questions and suggestions:
Q1: Do you know if it would be possible to implement tools to detect and discard invalid data automatically?
Good to know; I had wondered about how metadata was handled.
Q2: Is metadata stripping unique to this server, or a Lemmy-wide standard?
Q3: Is this limit set on a per-server basis, or a Lemmy-wide standard?
Q4:Would it be possible to implement automatic compression of large images?
Most modern phone cameras routinely take larger photos than 5MB.
Just some off-the-cuff suggestions, and I’m not even sure whether they would be best implemented by the instance or the platform.
Thanks for all of your help already!