Is there any way to know image size ? And truncate image?

Discussion in 'Javascript' started by bluedolphin, Apr 10, 2008.

  1. bluedolphin

    bluedolphin Guest

    I am trying to use javascript to detect the size of a image, so that I
    could show it in proper size. Such as I have a space which is 32 X 32,
    and the image size is 256 * 128, then I could shrink the image to 32 X
    16, with the same look and feel.

    Sometime I would also like to truncate a image, only show portion of
    the image using javascript.



    Thanks.
    bluedolphin, Apr 10, 2008
    #1
    1. Advertising

  2. bluedolphin

    CK Guest

    Words to the wise, bluedolphin <> wrote:

    >I am trying to use javascript to detect the size of a image, so that I
    >could show it in proper size. Such as I have a space which is 32 X 32,
    >and the image size is 256 * 128, then I could shrink the image to 32 X
    >16, with the same look and feel.
    >
    >Sometime I would also like to truncate a image, only show portion of
    >the image using javascript.
    >

    We do something like this already, by using PerlMagick to shrink the
    images before they are loaded.
    --
    Claus Dragon <>
    =(UDIC)=
    d++ e++ T--
    K1!2!3!456!7!S a29
    "Coffee is a mocker. So, I am going to mock."

    - Me, lately.
    CK, Apr 10, 2008
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. srinivasan srinivas
    Replies:
    0
    Views:
    244
    srinivasan srinivas
    Sep 14, 2008
  2. Gary Herron
    Replies:
    2
    Views:
    310
    Tim Chase
    Sep 14, 2008
  3. Andrew Fong

    Most pythonic way to truncate unicode?

    Andrew Fong, May 28, 2009, in forum: Python
    Replies:
    6
    Views:
    302
    John Machin
    May 29, 2009
  4. Andries

    I know, I know, I don't know

    Andries, Apr 23, 2004, in forum: Perl Misc
    Replies:
    3
    Views:
    227
    Gregory Toomey
    Apr 23, 2004
  5. Andries

    is there a way ..... any way

    Andries, Apr 26, 2004, in forum: Perl Misc
    Replies:
    27
    Views:
    246
    Robin
    Apr 27, 2004
Loading...

Share This Page