Printing pictures
I have a database picture field (Firebird 1.5 blob subtype 0) and it have assigned .bmp or .jpg pictures.
I have a TfrPictureView and, if I set BlobType to btBMP and try to show .bmp pictures, I get a lot of "bitmap image is not valid" messageboxes but pictures are shown, (this error can be produced by empty picture fields in database).
If I set BlobType to btJPG ({define JPEG} is enabled), and I try to show .jpg pictures, I get a "JPEG error #53" and nothing is shown
If I try to show .jpg when BlobType is btJPG or I try to show .bmp when BlobType is btBMP I get an error too
What can I do to show both two .jpg and .bmp pictures stored in my database?
I have a TfrPictureView and, if I set BlobType to btBMP and try to show .bmp pictures, I get a lot of "bitmap image is not valid" messageboxes but pictures are shown, (this error can be produced by empty picture fields in database).
If I set BlobType to btJPG ({define JPEG} is enabled), and I try to show .jpg pictures, I get a "JPEG error #53" and nothing is shown
If I try to show .jpg when BlobType is btJPG or I try to show .bmp when BlobType is btBMP I get an error too
What can I do to show both two .jpg and .bmp pictures stored in my database?
Comments
procedure TForm1.Doc1BeforePrint(Memo: TStringList; View: TView);
begin
if Memo.Count > 0 then
if (Memo[0] = '[Picture]') and (View is TPictureView) then
'Check the field is null here
(View as TPictureView).Picture.Assign(Table1Picture);
end;
2.Set TfrPictureView.Memo Value = [Picture]
3.Write write in TfrReport.BeforePrint
like i said