Manipulating images - how about images on external sources?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • woete
    New Member
    • Jan 2008
    • 2

    Manipulating images - how about images on external sources?

    I'd like to obtain an image's width and height. I find interesting articles on several sites... However, all these scripts only work with images that are stored locally.

    Can you give any hint on how to do the same thing with images that are located on external sources?

    For example, I mean, how can I obtain the width and height of this image: http://www.heartofwisd om.com/images/blog/Stumbleupon/thumbs-up.gif
    Is it possible anyway?
    (I can't find the solution on these pages, can you tell me where I find more hints to my question?)
    http://classicasp.aspf aq.com/files/directories-fso/how-do-i-create/manipulate-images-from-asp.html
    http://www.learnasp.co m/learn/graphicdetect.a sp
    http://www.webmasterwo rld.com/forum47/2509.htm
    http://www.4guysfromro lla.com/webtech/code/imgsz.asp.html
  • jhardman
    Recognized Expert Specialist
    • Jan 2007
    • 3405

    #2
    If you can open the file it should look like this (in bytes):"71, 73, 70, 56, 57, 97, 15, 0, 15, 0, ..." This should spell out (in ascii characters) "G I F 8 9 a 15 0 15 0 ..." This would be the start of a 15 x 15 gif image. A 23 x 20 gif image should start like this: "71, 73, 70, 56, 57, 97, 23, 0, 20, 0, ..."

    Let me know if this helps.

    Jared

    Comment

    • woete
      New Member
      • Jan 2008
      • 2

      #3
      Originally posted by jhardman
      If you can open the file it should look like this (in bytes):"71, 73, 70, 56, 57, 97, 15, 0, 15, 0, ..." This should spell out (in ascii characters) "G I F 8 9 a 15 0 15 0 ..." This would be the start of a 15 x 15 gif image. A 23 x 20 gif image should start like this: "71, 73, 70, 56, 57, 97, 23, 0, 20, 0, ..."

      Let me know if this helps.

      Jared
      Whow, sounds interesting. But how can I "open" the file (in ASP) ?
      And does it also work with JPG and other image file types?

      Comment

      • jhardman
        Recognized Expert Specialist
        • Jan 2007
        • 3405

        #4
        Originally posted by woete
        Whow, sounds interesting. But how can I "open" the file (in ASP) ?
        And does it also work with JPG and other image file types?
        opening the file would definitely be the tricky part. If it was local to your server that would be very easy using the fileSystemObjec t, but I don't know how you would do it with a remote file. I was kind of hoping from the way you phrased your question that you already had that part down. Can you upload the file at all?

        I imagine that most image files would have a similar set up with their dimensions in a fixed point near the beginning of the file, but I have never looked up any other documentation.

        Jared

        Comment

        Working...