I've now a blob file with an image in it. How can i insert it into a page? Around is some other text & stuff, so I can't set the header to
header("Content-type: image/gif");
or something...
thx for help
flo
You'll have to output the image in a separate script where you can do the header() call. There are data: URIs that allow embedding images in HTML pages directly but they suck for a multitude of reasons.
You can either try to embed the image using a data-URI (not supported across all browsers and most probably not practical in terms of page size and client side caching) or create a second script that only sends the blob (using the correct content-type) as an image to the user and embed this blob using a normal <img> tag.
You cannot do this directly. You'll have to make a new PHP script that extracts the blob data from the database, and set the appropriate headers.
However, there is another (browser dependant) way:
Enclose the base64 encoded blob in an tag. More info on this can be found here: http://bit.ly/ex0BSN