DetectBlobImages

Class: TEgDBGridEx

property DetectBlobImages: Boolean default False;

When False (the default), only a field with DataType = ftGraphic is drawn as an image. When True, a plain BLOB field (DataType = ftBlob, no more specific blob type - a memo/CLOB field is unaffected) is also tried as an image, using the same format detection as a real graphic field (JPEG, PNG, Bitmap, Icon, GIF, Metafile).

If the BLOB’s content does not decode as a recognized image format, this is handled silently rather than as a failure: OnGraphicError is not fired (unlike for a true ftGraphic field). An empty (null) field simply shows nothing; a non-null field whose content isn’t a recognized image format falls back to showing the field’s own display text (for example (BLOB)) instead of staying blank. OnBeforeDrawCell can still override either the image or the fallback text.

With DetectBlobImages left False, a plain (ftBlob) field is never tried as an image at all, and the cell shows nothing by default either - Null or not, its DisplayText is never shown. As with the True case above, OnBeforeDrawCell is the only way to put text on such a column.

Detection runs independently on each record’s own bytes, so a single BLOB column with DetectBlobImages set can freely mix rows that hold a recognized image (in any supported format) with rows that hold ordinary non-image binary data - the two kinds of content coexist in the same column without conflict, each row falling back to its own display text (or staying empty, if null) whenever that particular row isn’t an image.

This property can also be overridden per column - see TEgColumn.DetectBlobImages.

See Also

(C) 2026 Easygate, Lda