You are not logged in Log in Join
You are here: Home » Members » aheimsbakk's Home » LocalImageSystem » Information

Log in
Name

Password

 

Information

This product maps a folder on the local file system into Zopes structure. It checks whether a file is an image, independent of the file extension, and represent it in Zope as a Local Image object, unknown files are represented as Local File objects. Local folders are represented as Local Folder objects. Image views

The main tool in this product is the auto generating of predefined image views. Views are generated on demand and then cached on local disk for fast retrieval later.

Each view has a unique name, a dimension, image type (JPEG or PNG) and in addition an effect and a frame. Effects and frames are predefined image effects which can be added to the generated image. To add your own effects edit the code in effects.py and frames.py under the product folder. Please send code of fancy effects and frames to the author, thats me :), so it may be included in the next release of this product.

To view and generated image view use the path http://{image path}?view={name of view}.

Common properties

In the properties tab of a Local Image System you can set the option convert_original. When accessing a image on the path http://{image path} you always get a viewable image. The path to the original image is then http://{image path}/original. Only images other than JPEG, PNG and GIF are converted.

The property image_icon_view sets the view used in the icon property of an Local Image object.

Image meta data / methods

The first time a image is accessed, when the Local Image System product is added or when a file has been added in the local file system, meta data is read from the image and put into the Zope database for fast access. Meta data consist of content type, dimensions and EXIF data if there is any.

In addition to have the standard Zope methods and attributes a Local Image has these:

get_urls
Method returns a dictionary containing absolute links to all views, view name as key.
get_dimensions
Return a tuple with width and height.
get_exif
Return a dictionary with EXIF tag as key and dictionary as value. This dictionary contain the following keys: field_length, field_offset, field_type, printable, tag and values.
getContentType
Return the correct image type.
bobo_modification_time
Return the EXIF datetime if it exist, else it return the file datetime.
tag
This method is modified and now supports a view keyword argument, where the value is one of the defined views.

Both Local Folders and Local Files can be given additional attributes and security settings in Zope. If an image is changed in any way (in the local file system) additional attributes will be lost. The image can no longer be considered valid and the meta data will be read again.

This product is meant to be a help for those who want to take an already existing image archive on the local file system and publish it on the web. It can also be used as an replacement for ExtImage, which uses only a single repository directory.

Feedback

Please give me some feedback on aditional featchers, bugfixes or just to say if you find it usefull. Before requesting new featchers, please look at the TODO.txt to see if they already are planned. Write to [email protected].