Vote UpVote

Tip: detecting graphic formats

Delphi Haven – If you’re storing an image in a blob field or the like, I guess it’s not uncommon to have another field that specifies the graphic type. Really though, there’s no need, since the common graphic formats (‘common’ in a Delphi context at least) all have distinct signatures that allow for their identification – Windows Bitmap (BMP): the ASCII characters ‘BM’. GIF: the three ASCII characters ‘GIF’. JPEG: a ‘new marker’ indicator ($FF) followed by a ‘start of image’ marker ($D8). PNG: in order, the following eight ASCII characters – #137, ‘P’, ‘N’, ‘G’, #13, #10, #26 and #10. TIFF: ‘II’ ...
Favorite? Off-Topic? CR @ 2011-01-22 16:51


Visits: 658
Votes: 4
Favorites: 1
Off-Topic: 0

Visits by Source

User Actions

Users who voted for this posting

Alister Christie
The Delphi Disciple
Contact us to advertise on DelphiFeeds.com

Community Links

Torry Firebird News


Please login or register to use this functionality.
(click on this box to dismiss)