Mysql Image Blobs

Help
2005-06-23
2013-04-26
  • Attilio Drei
    Attilio Drei
    2005-06-23

    to display a mysql jpeg image i need to remove 
    QByteArray imgdata = QUUDecode(uudata);
    ( if i store a uuencoded jpeg into a mysql blob it works) .
    How can i  do this ?

     
    • Chris Ryan
      Chris Ryan
      2005-06-24

      When the report writer was initially designed Qt did not have sufficient support for Blobs on our target database. We choose to use the Quuencoded method for storing images in the database. I am not familiar with what steps are required to retrieve binary blob data from a database. If you wanted to do this you would have to replace the code that retrieves and decodes the image with whatever was appropriate for reading the data. The Writer and renderer both have sections of code for dealing with images that would need to be addressed. However to complicate things the report support inline images which are also in UUEncoded form. In order to maintain this support for the XML you would probably need some way to tell the difference and handle each source correctly.

      Chris Ryan