Results 1 to 3 of 3

Thread: [RESOLVED]Get Image Dimensions

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jul 2011
    Posts
    22

    Question [RESOLVED]Get Image Dimensions

    Hello,
    I would need some code to find out the resolution (width & height) of a picture, that is stored on my drive?
    It would be nice if I wouldn't have to open it (load to picturebox).
    Do You know some easy (short) way of doing this, because all I could find were some old codes for VB6.
    Last edited by kubau2; Oct 6th, 2013 at 02:15 AM.

  2. #2
    eXtreme Programmer .paul.'s Avatar
    Join Date
    May 2007
    Location
    Chelmsford UK
    Posts
    26,413

    Re: Get Image Dimensions

    try this:

    Code:
    dim img as new bitmap("filename")
    msgbox(img.size.tostring)

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Jul 2011
    Posts
    22

    Re: Get Image Dimensions

    Quote Originally Posted by .paul. View Post
    try this:

    Code:
    dim img as new bitmap("filename")
    msgbox(img.size.tostring)
    Thank You very much, that's exactly what I was looking for.

Tags for this Thread

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