in reply to insert & retrieve images from DB to web

Have you considered converting the images to base 64 and storing them as strings? I have used MIME::Base64 to do this with other binary formats
  • Comment on Re: insert & retrieve images from DB to web

Replies are listed 'Best First'.
Re^2: insert & retrieve images from DB to web
by ksublondie (Friar) on Sep 08, 2008 at 20:57 UTC
    I'm slowly making progress. There's a sybase connection attribute (syb_binary_images) that by default returns binary as hex. Now I don't have to convert the data.

    Now I've discovered that the issue appears to be independent of the db. I've taken a larger sampling of files to read and print directly to the browser. The same images are displaying incorrectly (stupid me should have done this to begin with). I can open the gif files with either a browser or my image viewer and it looks fine. Reading the files and printing data to the browser is causing problems.

    All the sample code I've found is doing the same thing I am (see code in original node). Ideas???

      have you tried calling binmode on the input file handle after you open it?

        THAT WAS IT!!!!!!!! :D

        ThankyouThankyouThankyouThankyouThankyouThankyou!

        ...the obvious is always the hardest to see...

        --ksublondie