Wie gehe ich damit richtig um: RegisterFileFormat

julius-krebs

Grünschnabel
Ich möchte in ein Timage Objekt während der Laufzeit ein jpg Bild laden. Der Befehl LoadFromFile war zuvor bei bmp Bildern erfolgreich, bei einem jpg funktioniert es jedoch leider nicht.
Die Borland Hilfe kann mir leider auch nicht mehr sagen, dass das gewünschte Dateiformat zuvor mittels der Funktion RegisterFileFormat definiert werden kann.

Könnt ihr mir sagen, was genau ich für Parameter übermitteln soll (am besten anhand eines Beispiels). Die Ergebnisse bei Google haben bei mir übrigens nicht funktioniert.

Es folgt eine Kopie der angesprochenen Hilfe:

Registers a new TGraphic class for use in LoadFromFile.

Class
TPicture

Syntax

Code:
procedure RegisterFileFormat(const AExtension: string; const ADescription: string; AGraphicClass: TGraphicClass);


Description
Use RegisterFileFormat to register a graphic file format with TPicture so that it can be used with a Open or Save dialog box.

The AExtension parameter specifies the three-character system file extension to associate with the graphic class (for example, "bmp" is associated with TBitmap). The ADescription parameter specifies the description of the graphic to appear in the drop down list of the dialog box (for example, "Bitmaps" is the description of TBitmap). The AGraphicClass parameter registers the new graphic class to associate with the file format.

Related Information
TPicture.LoadFromFile
TPicture.UnregisterGraphicClass
 

Neue Beiträge

Zurück