Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Cant get Dynamic Image (BLOB based) to work
Cant get Dynamic Image (BLOB based) to work [message #162045] Wed, 17 May 2006 19:00
Rob Mellor is currently offline Rob MellorFriend
Messages: 3
Registered: July 2009
Junior Member
I am having problems retrieving and showing a dynamic image using BIRT. I
have a mediumblob column in my mysql database which contains base64
encoded images (jpegs mostly). I try placing the "Image->Dynamic" and
binding it to an appropriate dataset, then placing that in a List->details
band. I also tried placing the Dynamic Image inside of the context of a
Table->details band with no luck. I get red X boxes appearing for every
image. So, it seems like it is correctly getting the data back from the
DB, but it fails to actually render the image? For each image I am
testing by displaying its GUID in one column and the Dynamic Image in the
other. The GUID column successfully shows the image's GUID but the
Dynamic Image always appears as the X invalid image button.

Any help would be appreciated... Has anyone gotten this to work properly?
"mediumblob" should be essentially a "blob" datatype, just of different
size.

Here is my mysql table and some code I use on the php side to
insert/encode and then extract/decode/show image to user. The image is
displayed correctly in my web application using the code below:

CREATE TABLE image (
ImageID int(11) NOT NULL auto_increment,
Image mediumblob
...
)

The image is inserted into the mysql database via php:
$image = base64_encode($data);
$image is then inserted.

To view as part of a webpage:, I do the following (in php) & present the
image as part of a webpage:

Header("Content-type: image/jpeg");
require_once "db.php";
DB_Connect();
$sql = "SELECT Image FROM image WHERE ImageID=$image";
$result = DB_Query($sql);
if(!$result)
echo "Error during query; $sql";
$myrow = DB_Fetch_Array($result);

$blaa = base64_decode($myrow[0]);
echo "$blaa";
Previous Topic:publishing Birt Reports
Next Topic:How to set list-property parameters for a DataSet using DE API
Goto Forum:
  


Current Time: Sat Aug 17 04:23:35 GMT 2024

Powered by FUDForum. Page generated in 0.02254 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top