General concept for image support

In HTML images are separated from documents. Documents contain references to image files in the place where images should appear inside a document. An image reference describes the location and name of respective image file as well as how it is to be rendered. The actual images are stored separately in image files and loaded dynamically when documents are displayed.

SimplyHTML supports image references by maintaining an image repository for each document. An image repository in this context is a directory containing all images referenced by a HTML document.

Restrictions

To keep image maintenance simple, the following restrictions are used in SimplyHTML

- image files referenced from HTML documents are automatically placed into directory images
- directory images is created automatically inside the directory, a HTML file is saved

SimplyHTML has no support for creation or manipulation of image files as in image editing software . Image files need to be present already to be added to documents created or maintained with SimplyHTML.

Supported image formats

SimplyHTML supports the following image file formats

- Graphics Interchange Format (GIF)
- Joint Photographic Expert Group (JPEG) format

Temporary storage

To allow image processing for newly created documents (i.e. documents not having been saved at the time images are added) a temporary directory is maintained. The temporary storage is maintained automatically by SimplyHTML in directory

[user home]/SimplyHTML/temp/.

[user home] in this context is the directory returned by the Java expression System.getProperty("user.home"). It is usually the directory where a user logged in to a given system has all rights and where no other user except for system administrators has access rights unless explicitly granted by the owner or system administrator.

Using directory [user home] has the effect that every user has an own temporary storage area.

Images in new documents

For each newly created document a directory is created inside the temporary directory named after the document,

e.g. [user home]/SimplyHTML/temp/Untitled 1/.

If images are added to a document which has not been saved so far, directory images is created inside the temporary directory,

e.g. [user home]/SimplyHTML/temp/Untitled 1/images/.

Once a new document is saved, the image directory is copied from the temporary storage to the directory the new document has been saved.

Images in existing documents

If images are added to an existing document, respective image files are stored in directory images inside the directory the document was loaded from. Directory images is created in the directory the document was loaded from by application SimplyHTML when it is not already present an images are added to that document.