When creating a link for a new attachment, Attach.pm parses image files to determine the image size for the ≶IMG> tag.
The magic code for JPEG files doesn't handle jpeg DCF - the format used by digital camera media cards. So many, many of today's attached JPEG files don't get the intended height and width in the tag!
Easy fix:
in
sub _imgsize {
Replace:
elsif ($a == 0xFF
&& $b == 0xD8
&& $c == 0xFF
&& $d == 0xE0 )
{
# JPG ff d8 ff e0
With:
elsif ($a == 0xFF
&& $b == 0xD8
&& $c == 0xFF
&& ($d == 0xE0 || $d == 0xE1) )
{
# JPG ff d8 ff e0/e1=
--
TWiki:Main/TimotheLitt
- 27 Jun 2010
Thank you Timothe! Since you have SVN access (
TWiki:Codev/TimotheLittWouldLikeToCheckIn
) could you checkin the fix yourself? This needs to go into trunk and 5.0 branch.
--
PeterThoeny - 28 Jun 2010
This was fixed in
Item6508, and released in TWiki-5.0.1.
--
TWiki:Main.PeterThoeny
- 2013-09-28