TftBmpFromSdRawAlias()

 visits
Parent Previous Next


Syntax

TftBmpFromSdRawAlias(sAlias As sTempSd2Raw, wX_Pos As Word, wY_Pos As Word), Byte

Parameters

Parameter

Type

Description

sAlias

sTempSd2Raw

The alias name to look up in the card's built-in file index.

wX_Pos

Word

X coordinate of the lower-left corner of the image.

wY_Pos

Word

Y coordinate of the lower-left corner of the image.

Return value

Value

Meaning

0

SD card initialisation failed.

200

The SD card is blank.

201

The card is not in Modern mode.

202

No file was found for the requested alias.

255

The operation completed successfully.

Other values

A return code from TftRgbFromSdRaw().


Draws a BMP image from an SD card in RAW mode, using its stored alias to locate the file. The card must have been written in Modern mode.


How the alias lookup works

The files are stored sequentially on the card without FAT16/FAT32. Modern mode supplies a built-in file index containing aliases, so the program can select a file by name instead of specifying its sector position.

Image width and height are read from the BMP file. You do not pass those dimensions to this procedure.

Example

Dim bResult As Byte


' Replace "Splash" with an alias stored on your card.

bResult = TftBmpFromSdRawAlias("Splash", 0, 0)

If bResult <> 255 Then

    ' Handle the returned status code.

EndIf

Notes

Modern mode is required. A card prepared only for sector-addressed RAW access does not provide the alias index this procedure needs. Use Positron Media Foundry to prepare the card in Modern mode.

Use a BMP supported by the library's RAW image routine. See TftBmpFromSdRaw() for its BMP format requirements.

See also

TftBmpFromSdRaw() · TftRgbFromSdRawAlias() · RAW / No file system

Created with the Personal Edition of HelpNDoc: Effortlessly Create Encrypted, Password-Protected PDFs