User Tools

Site Tools


Sidebar

Multimedia

k23:k23.4:k23.4.2:k23.4.2.4:start

23.4.2.4 Class ImageStat (gb.image)

This class enables the return of selected information about a specific image. The class cannot be generated and can be used as a static function.

The static function:

Static Function ImageStat ( ImagePath As String ) As ImageStat

returns information about the image specified in the “ImagePath” argument.

23.4.2.4.1 Example:

Public Sub Form_Open()
 
  Dim statImage As ImageStat
 
  statImage = ImageStat(User.Home &/ "Pictures/example.jpg")
 
  Print "Image Depth = " & statImage.Depth
  Print "Image Height = " & statImage.Height
  Print "Image Width = " & statImage.Width
  Print "Image Path = " & statImage.Path
  Print "Image Type = " & statImage.Type
 
End

23.4.2.4.2 Properties

The following table describes the properties of the class:

PropertyTypeDescription
DepthIntegerReturns the colour depth of the image in bits.
HeightIntegerReturns the height of the image in pixels.
WidthIntegerReturns the image width in pixels.
PathStringReturns the path of the image.
TypeStringReturns the mimetype of the image as a string. The string can be “image/jpeg”, “image/gif”, “image/png”, “image/bmp” or “image/tiff”.

Table 23.4.2.4.1 : Properties class ImageStat (gb.image)

The website uses a temporary session cookie. This technically necessary cookie is deleted when the browser is closed. You can find information on cookies in our privacy policy.
k23/k23.4/k23.4.2/k23.4.2.4/start.txt · Last modified: 07.01.2024 (external edit)

Page Tools