ArcPad Scripting Object Model
Close Method
See Also  Example  Send comments on this topic.
Image Object : Close Method

Glossary Item Box

Description

Closes the image.

Syntax

object.Close

Example

Image Object Example
Retrieves and sets EXIF tag values for a JPEG file.Retrieves and sets EXIF tag values for a JPEG file.
Image Object Example (VBScript)Copy Code
Sub DisplayEXIFInfo
      Dim pImage, strJPEGPath
      Dim dblLat, dblLon, dblAlt, dtTime
      '++ get the JPEG image
      strJPEGPath= CommonDialog.ShowOpen("jpg","JPG - JPEG Image|*.jpg","",&H1000)
      If strJPEGPath = "" Then Exit Sub
      '++ create the Image object and load the JPEG image
      Set pImage = Application.CreateAppObject("Image")
      pImage.Open strJPEGPath
      '++ set title and comments
      pImage.Title = "My Photo"
      pImage.Comments = "Taken by me on a beautiful, sunny day"
      '++ read some EXIF fields
      dblLat = pImage.Properties(2)
      dblLon = pImage.Properties(4)
      dblAlt = pImage.Properties(6)
      dtTime = pImage.Properties(36867)
      '++ display info
      Application.MessageBox "Title: " & pImage.Title & apNewLine & _
                              "Comments: " & pImage.Comments & apNewLine & _
                              "Lat: " & dblLat & apNewLine & _
                              "Lon: " & dblLon & apNewLine & _
                              "Alt: " & dblAlt & apNewLine & _
                              "Time taken: " & dtTime, apInformation, "EXIF"
                             
      '++ clean up
      pImage.Close
End Sub

See Also

© 2013 All Rights Reserved.