Menu

#20 Images with spaces have zero dimensions

open
nobody
5
2004-02-07
2004-02-07
No

If you have an image with spaces in its name, its thumb
is generated, but any references to the image in html
pages have
width="0" and height="0" so they don't get displayed.

Discussion

  • Nobody/Anonymous

    Logged In: NO

    The problem is in the function

    imageSizeNoCache()
    ....
    mre = re.compile( "([0-9]+)x([0-9]+)" )
    ---> mo = mre.match( string.split( output )[1] )
    if not mo:
    ---> mo = mre.match( string.split( output )[2] )
    if mo:
    ( width, height ) = map( lambda x: int(x),
    mo.groups() )
    return ( width, height )
    .....
    The indicated line will read the wrong part of the return
    string if there is a space in the full pathname (either the
    filename or the directory name)

     
  • Dan Cernese

    Dan Cernese - 2004-07-10

    Logged In: YES
    user_id=594430

    That explains what I'm seeing!

     
  • Dan Cernese

    Dan Cernese - 2004-07-10

    Logged In: YES
    user_id=594430

    That explains what I'm seeing!

     
  • Dan Langille

    Dan Langille - 2005-10-04

    Logged In: YES
    user_id=27858

    I just encountered this problem too. Nasty.

     

Log in to post a comment.

Monday.com Logo