Uses OnGraphicError
to report a picture field whose bytes cannot be decoded, which otherwise
only shows as a cell with the field’s text instead of the picture.
The Photo column shows the products’ pictures. A damaged
picture, or one in a format the platform cannot decode, is written to
the application’s log with the product it belongs to.
Besides EgFireGrid: System.SysUtils
(Format, FormatDateTime,
Now).
procedure TForm1.Grid1GraphicError(Sender: TObject; Column: TEgFireGridColumn; const Msg: string);
begin
LogMemo.Lines.Add(Format('%s: picture of column %s not shown (%s)',
[FormatDateTime('hh:nn:ss', Now), Column.Title.Caption, Msg]));
end;
OnBeforeDrawCell
handler that sets the Photo cells’ Text to, say,
'Bad picture: <var>Name</var>' shows it only on
the rows whose picture failed.DetectBlobImages
are not reported: a BLOB that is not a picture is expected.