https://www.phpbb.com/community/viewtopic.php?f=556&t=2445676#p14864301[/url]"]
Re: Error with Picture resulotion on Upload
Post by AmigoJack » Mon Nov 13, 2017 9:44 am
There are multiple problems:
a. The picture itself is correct, but has EXIF data which seems to be from the original file, not this 150x150px version. EXIF data is (amongst other):
[...]
b. phpBB wants to be smart at detecting the dimensions, but fails (
again). It trusts the EXIF data more than the SOF0 segment, although the latter correctly tells us width and height and is more trustworthy. This comes from /vendor/marc1706/fast-image-size/lib/Type/TypeJpeg.php which has a wrong order of checks:
[...]
c. Avoid software which breaks JPEG standards and/or mistreats EXIF data (anything from Adobe, which can be seen in the XMP metadata:
If you want to "repair" your picture then
Open it in your favorite image editor (mostly thru CTRL+O), then either
copy it to the clipboard (the picture's 150x150px canvas, not the file - this means to most editors CTRL+A, then CTRL+C),
create a new file with the same dimensions (mostly CTRL+N),
paste your clipboard content (mostly CTRL+V),
save the file (mostly CTRL+S).
...or save the file in a different format (PNG, GIF, BMP...).
That way the metadata will not be copied (in case you choose JPEG as format again you'll notice a big difference in the filesize) and phpBB will finally recognize the correct dimensions.