NOTE: If you are a developer, please use a private wiki based on foswiki/trunk on a daily base ...or use
trunk.foswiki.org to view this page for some minimal testing.
Use
Item9693 for docu changes for 1.2 and 2.0.
Item9207: Attach.pm not including image size for some JPEG files
| Priority: |
CurrentState: |
AppliesTo: |
Component: |
WaitingFor: |
| Normal |
Closed |
Engine |
TopicAttachment |
|
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!
This goes back to, and still exists in, TWiki
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=
--
TimotheLitt - 27 Jun 2010
Thanks for the fix. Checked into trunk
--
KennethLavrsen - 27 Jun 2010