HTML help/images in a database

Hi all,

For those of you doing help in your app, I’ve read a few of the posts here and a few people mentioned that they put their help and images in a SQLite database.

This is the method I would like to follow.

I modified the Xojo example that stores files into a database to be my help storage tool. So I can get all the HTML and images into the database.

The piece I’m missing is how to display the images from the database. I’ve seen a few references to using base64 encoding but I thought I would ask how some of you accomplished it.

My help will have various screenshots embedded in the page. Something like:

Welcome to my app

Here is what it can do for you, blah, blah.

The first tab shows this information:

So I can store the HTML in the database no problem. I can also store the screen shot images in the database as well. But in my HTML file what is the way, that is compatible with the HTML viewer in Xojo to link the screenshot images out of the database for display?

Are you simply writing the images back to disk as filename when needed?

Using base64, reading the image and supplying that base64 stream to your image tag?

A small example from someone would be very much appreciated.

If they’re not photos, try using SVG instead. They’re still XML based and can be rendered inline.

Yes, it is possible to store the pictures inside the HTML as Base64, but this will make them even larger than the original JPEG/PNG files.
I store a Help URL link for each topic in my SQLite database, but it links to a web host-based HTML file with the images on the web. Otherwise your app will be HUGE with all those web pages.

Thanks Greg and David, I was starting to consider SVG and i think that is the way to go.

Turns out my PixelMater will convert them so that works nicely.