Project Analyzer

Variable references – PicInfo sample application

PicBMP

BMPType As EBMPType

PicBMP.ReadBitmapFile:
  BMPType = bmpUnknown ' Set file type to bmpUnknown until we can verify the real type
  BMPType = bmpCoreHeader
  BMPType = bmpInfoHeader
PicBMP.IPicInfo_MaxColors [Get]:
  Select Case BMPType
PicBMP.IPicInfo_Size [Get]:
  Select Case BMPType

CoreHeader As BITMAPCOREHEADER

PicBMP.ReadBitmapFile:
  Case Len(CoreHeader)
  Get #FileNr, , CoreHeader
PicBMP.IPicInfo_MaxColors [Get]:
  IPicInfo_MaxColors = 2 ^ CoreHeader.bcBitCount
PicBMP.IPicInfo_Size [Get]:
  IPicInfo_Size.Width = CoreHeader.bcWidth
  IPicInfo_Size.Height = CoreHeader.bcHeight

InfoHeader As BITMAPINFOHEADER

PicBMP.ReadBitmapFile:
  Case Len(InfoHeader)
  Get #FileNr, , InfoHeader
  Select Case InfoHeader.biCompression
PicBMP.IPicInfo_MaxColors [Get]:
  IPicInfo_MaxColors = 2 ^ InfoHeader.biBitCount
PicBMP.IPicInfo_Size [Get]:
  IPicInfo_Size.Width = InfoHeader.biWidth
  IPicInfo_Size.Height = InfoHeader.biHeight

IsRLE As Boolean

PicBMP.ReadBitmapFile:
  IsRLE = False        ' Clear the IsRLE flag. We will set it below to True if required.
  IsRLE = True
Written only

StoredFilename As String

PicBMP.IPicInfo_Filename [Get]:
  IPicInfo_Filename = StoredFilename
Read only


PicGIF

FileOK As Boolean

PicGIF.ReadGIF:
  FileOK = False              ' Clear the FileOK flag until we have successfully read a valid .gif file
  FileOK = True
PicGIF.Version [Get]:
  If FileOK Then
PicGIF.IPicInfo_MaxColors [Get]:
  If FileOK Then
PicGIF.IPicInfo_Size [Get]:
  If FileOK Then

LogicalScreenDescriptor As TLogicalScreenDescriptor

PicGIF.ReadGIF:
  If LOF(FileNr) > Len(Signature) + Len(LogicalScreenDescriptor) Then
  Get #FileNr, , LogicalScreenDescriptor
  ColorResolution = (LogicalScreenDescriptor.Packed And (64 + 32 + 16)) \ 16 + 1
PicGIF.IPicInfo_Size [Get]:
  IPicInfo_Size.Width = UInt(LogicalScreenDescriptor.Width)
  IPicInfo_Size.Height = UInt(LogicalScreenDescriptor.Height)

MaxColors As Long

PicGIF.ReadGIF:
  MaxColors = 2 ^ ColorResolution
PicGIF.IPicInfo_MaxColors [Get]:
  IPicInfo_MaxColors = MaxColors

Signature As String * 6

PicGIF.ReadGIF:
  If LOF(FileNr) > Len(Signature) + Len(LogicalScreenDescriptor) Then
  Get #FileNr, 1, Signature
  If Signature = "GIF87a" Or Signature = "GIF89a" Then
  If Signature = "GIF87a" Or Signature = "GIF89a" Then
PicGIF.Version [Get]:
  Version = Signature

StoredFilename As String

PicGIF.ReadGIF:
  StoredFilename = GIFFilename ' Store Filename for later retrieval
PicGIF.IPicInfo_Filename [Get]:
  IPicInfo_Filename = StoredFilename


PicMain

ProgramTitle As String

PicForm.Form_Load:
  Me.Caption = ProgramTitle ' Global variable access
PicMain.Main:
  ProgramTitle = App.Title