Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

Getting a JPEG Error #52 on loading picture

edited June 2002 in General
Hi,

I have loaded a JPEG image into my DBISAM table using the following code:

mimage.picture.LoadFromFile('picture.jpg');
mtable.fieldByName('thepic').assign(mimage.Picture.graphic);

The image then displays just fine when I run my program, but when I attempt
to print the report containing a ppDBImage pointing to the appropriate
field, I get the JPEG Error #52 every time and it cannot generate the
report.

I do have JPEG and ppJPEG in my uses clause, and I do have the ppDBImage
graphic type set to 'JPEG'.

Any suggestions would be greatly appreciated!

Thanks,
Jason

Comments

  • edited June 2002
    If the graphic type on the DBImage is set to JPEG, then it should work. Can
    you send us the image or table and we can test it here. Send it to
    support@digital-metaphors.com

    Another way to include an image from the database is by reading the field
    from the datapipeline as a picture when the detail band begins generating:

    ppImage1.Picture.Assign(ppDBPipeline1.GetFieldAsPicture('ImageFieldName'));


    Cheers,

    Jim Bennett
    Digital Metaphors

This discussion has been closed.