• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

Item6507: Some JPEG files don't get height, width when attached

Item Form Data

AppliesTo: Component: Priority: CurrentState: WaitingFor: TargetRelease ReleasedIn
Engine Attach.pm Normal Closed   n/a  

Edit Form Data

Summary:
Reported By:
Codebase:
Applies To:
Component:
Priority:
Current State:
Waiting For:
Target Release:
Released In:
 

Detail

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

ItemTemplate
Summary Some JPEG files don't get height, width when attached
ReportedBy TWiki:Main.TimotheLitt
Codebase ~twiki4, 5.0.0, 4.3.2, 4.3.1, 4.3.0, 4.2.4, 4.2.3, 4.2.2, 4.2.1, 4.2.0, 4.1.2, 4.1.1, 4.1.0, 4.0.5, 4.0.4, 4.0.3, 4.0.2, 4.0.1, 4.0.0
SVN Range TWiki-5.0.0, Sun, 20 Jun 2010, build 19085
AppliesTo Engine
Component Attach.pm
Priority Normal
CurrentState Closed
WaitingFor

Checkins

TargetRelease n/a
ReleasedIn

Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r3 - 2013-09-28 - PeterThoeny
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback