Results 1 to 6 of 6

Thread: How can I figure out the size of an image file without loading the image?

  1. #1

    Thread Starter
    Frenzied Member MrGTI's Avatar
    Join Date
    Oct 2000
    Location
    Ontario, Canada
    Posts
    1,277

    Unhappy

    There might a control or two on the market that do that, but i think they require that the image be loaded as well, so i don't think you'll be able to do that.
    ~Peter


  2. #2
    Need-a-life Member Mc Brain's Avatar
    Join Date
    Apr 2000
    Location
    Buenos Aires, Argentina
    Posts
    6,808
    You don't need an extra control to know the size of the picture if you need it loaded. Once you get your picture loaded on a picturebox you can know its size.
    Emiliano F. Martín


    If a post has helped you then please Rate it! (and give the user points he/she deserves by clicking on the image).
    Encourage the person who helped you to keep doing it, and give him the points he deserves.


    MP3 Organizer: Freeware to logically organize all your MP3s.

  3. #3

    Thread Starter
    Frenzied Member MrGTI's Avatar
    Join Date
    Oct 2000
    Location
    Ontario, Canada
    Posts
    1,277

    Question

    But he said that he DIDN'T want to load the image......
    ~Peter


  4. #4
    Need-a-life Member Mc Brain's Avatar
    Join Date
    Apr 2000
    Location
    Buenos Aires, Argentina
    Posts
    6,808
    I know that... but you said about extra controls which needs the image to be loaded. So, why would you use an extra control if you can do the same with a picturebox?
    Emiliano F. Martín


    If a post has helped you then please Rate it! (and give the user points he/she deserves by clicking on the image).
    Encourage the person who helped you to keep doing it, and give him the points he deserves.


    MP3 Organizer: Freeware to logically organize all your MP3s.

  5. #5
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428
    hehe, tnx anyways
    sounds like LoadImage is as slow as LoadPicture if you want to load the whole image
    thank anyways

  6. #6
    PowerPoster beachbum's Avatar
    Join Date
    Jul 2001
    Location
    Wollongong, NSW, Australia
    Posts
    2,274
    I dont know how to do it but i think that it must be possible somehow.. ie when u right click on a pic and get the properties (in Internet Explorer) it gives u the pic dimensions whether or not they were set in html. Now, maybe there is some processing of the pic in the background or maybe it somehow reads the file header information. I would assume that each type of pic stores the dimensions somewhere at the start of the file. Maybe some graphicky person knows this...
    Stuart Laidlaw
    Brightspark Financial Software
    http://www.gstsmartbook.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width