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

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • bluedolphin

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

    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.
  • CK

    #2
    Re: Is there any way to know image size ? And truncate image?

    Words to the wise, bluedolphin <jacksuyu@gmail .comwrote:
    >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 <clauskick@mpsa hotmail.com>
    =(UDIC)=
    d++ e++ T--
    K1!2!3!456!7!S a29
    "Coffee is a mocker. So, I am going to mock."

    - Me, lately.

    Comment

    Working...