Results 1 to 28 of 28

Thread: JPG picture size...(Adobe) *Solved*

Threaded View

  1. #1

    Thread Starter
    Retired G&G Mod NoteMe's Avatar
    Join Date
    Oct 2002
    Location
    @ Opera Software
    Posts
    10,190

    JPG picture size...(Adobe) *Solved*

    How can I find out what size a JPG picture has without opening it up in a Image controll or Picture controll. The picture is saved in Adobe Photo Shop 6.X. If I save it in a PSP or something I can do something like this to find the size.

    VB Code:
    1. Public Type ThePicInfo
    2.     Type As String
    3.     Width As Long
    4.     Height As Long
    5. End Type
    6.  
    7. Private Function CheckPicSpecs(TheFile) As ThePicInfo
    8.     Dim TheContent, TheImageInfo As ThePicInfo, TheVar, TheFreeFile
    9.     TheFreeFile = FreeFile
    10.     Open TheFile For Binary As TheFreeFile
    11.     TheContent = Input(10, TheFreeFile)
    12.     Close TheFreeFile
    13.     If Mid(TheContent, 7, 4) = "JFIF" Then
    14.        TheImageInfo.Type = "JPG"
    15.        Open TheFile For Binary As TheFreeFile
    16.        TheContent = Input(167, TheFreeFile)
    17.        Close TheFreeFile
    18.        TheImageInfo.Height = Asc(Mid(TheContent, 165, 1)) + 256 * Asc(Mid(TheContent, 164, 1))
    19.        TheImageInfo.Width = Asc(Mid(TheContent, 167, 1)) + 256 * Asc(Mid(TheContent, 166, 1))
    20.     End If
    21.     If Mid(TheContent, 1, 3) = "GIF" Then
    22.        TheImageInfo.Type = "GIF"
    23.        TheImageInfo.Width = Asc(Mid(TheContent, 7, 1)) + 256 * Asc(Mid(TheContent, 8, 1))
    24.        TheImageInfo.Height = Asc(Mid(TheContent, 9, 1)) + 256 * Asc(Mid(TheContent, 10, 1))
    25.     End If
    26.     CheckPicSpecs = TheImageInfo
    27. End Function

    but that want help with the files saved in Adbobe. Any help?

    The pictures look like this.



    Thanks in advance...
    Last edited by NoteMe; Mar 9th, 2003 at 05:07 PM.

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