Difference between revisions of "TDBImage"
From Free Pascal wiki
Jump to navigationJump to searchm |
|||
Line 1: | Line 1: | ||
− | + | '''TDBImage''' [[image:tdbimage.png]] is a data-bound control that shows images stored in BLOB fields in databases. | |
− | TDBImage is a data-bound control that shows images stored in BLOB fields in databases. | ||
− | |||
− | |||
− | |||
− | |||
== Storage == | == Storage == | ||
− | By default, Lazarus stores the binary image data preceded by the file extension to define the file type. This allows storing multiple image formats at will. | + | By default, Lazarus stores the binary image data preceded by the file extension to define the file type. |
+ | This allows storing multiple image formats at will. | ||
Delphi only allows a single file format (jpg?). Recent Lazarus versions allow this storage format as well and try to autodetect the image type based on magic data in the beginning of the binary data. | Delphi only allows a single file format (jpg?). Recent Lazarus versions allow this storage format as well and try to autodetect the image type based on magic data in the beginning of the binary data. | ||
− | |||
== Example == | == Example == | ||
Line 17: | Line 12: | ||
[[Image:mushrooms.png|Screen shot]] | [[Image:mushrooms.png|Screen shot]] | ||
− | + | == see also == | |
+ | * [[doc:/lcl/dbctrls/tdbimage.html|TDBImage doc]] | ||
+ | |||
{{LCL Components}} | {{LCL Components}} | ||
− | |||
[[Category:Databases]] | [[Category:Databases]] | ||
[[Category:Graphics]] | [[Category:Graphics]] |
Revision as of 22:07, 24 July 2016
TDBImage is a data-bound control that shows images stored in BLOB fields in databases.
Storage
By default, Lazarus stores the binary image data preceded by the file extension to define the file type. This allows storing multiple image formats at will.
Delphi only allows a single file format (jpg?). Recent Lazarus versions allow this storage format as well and try to autodetect the image type based on magic data in the beginning of the binary data.
Example
See e.g. the sqlite_mushrooms/image_mushrooms example program in your Lazarus directory examples\database\
see also