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_
Select Case BMPType
PicBMP.IPicInfo_
Select Case BMPType
CoreHeader As BITMAPCOREHEADER
PicBMP.ReadBitmapFile:Case Len(CoreHeader)
Get #FileNr, , CoreHeader
PicBMP.IPicInfo_
IPicInfo_
PicBMP.IPicInfo_
IPicInfo_
IPicInfo_
InfoHeader As BITMAPINFOHEADER
PicBMP.ReadBitmapFile:Case Len(InfoHeader)
Get #FileNr, , InfoHeader
Select Case InfoHeader.biCompression
PicBMP.IPicInfo_
IPicInfo_
PicBMP.IPicInfo_
IPicInfo_
IPicInfo_
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_IPicInfo_
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_
If FileOK Then
PicGIF.IPicInfo_
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_
IPicInfo_
IPicInfo_
MaxColors As Long
PicGIF.ReadGIF:MaxColors = 2 ^ ColorResolution
PicGIF.IPicInfo_
IPicInfo_
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_
IPicInfo_
PicMain
ProgramTitle As String
PicForm.Form_Me.Caption = ProgramTitle ' Global variable access
PicMain.Main:
ProgramTitle = App.Title