I think you are out of luck since Cognos needs to read the images from disk when generating the PDF.
Here's some alternate solutions:
Try to extract the images you need from the database and write em to disk and then you can use Cognos to read the images from disk with tag or image tools from Cognos.
OR
Build a web service that act as an image but reads the data from database (proxy) so when the image is called in tag, the webservice returns the bytes from database. It could work though I never tried it. Worth a shot imo ;)
You can fin some example here :