-
Licence is contained in this file.
This package contains two components:
-
ImageDb::DB is a simple ruby-based client or API for accessing and using an image database. Its primary purpose is to make handling different sized versions of the same image as easy as possible. It is both a way of storing these images in the filesystem and a simple wrapper for performing basic operations on them.
-
ImageFile::Image defines an Image class that represents an image file. This can be run without ImageDb.
-
For documentation on both of these build or check rdoc documentation or the source files (in lib/).
-
You might be interested in this if you need to be able to show the same image at various different sizes
-
An acts_as_image_file plugin for rails has also been written to use this software; see github.com/danielbush
-
the image databse (db) is filesystem-based (ie hierarchical)
-
the db has a root directory
-
images are stored as normal files under the root directory in various folders
-
multiple copies of the image can be retrieved and stored based on differences in width or height
-
sized images can be autogenerated
-
the db does not handle or is not aware of image ppi
-
the intention is to use it to store web-ready images which are usually 72-96 ppi and to be accessed from a web framework such as rails
-
the db treats an image with same name other than its format (.png,.jpg etc) as a different image
-
dimensions are always specified in pixels
-
names in the db should probably be composed of letters, numbers, hyphens and underscores
-
Date: 19-Jun-2010
-
ImageDB is experimental. It may have been easier to implement this in an RDBMS using active record for example.
-
Possible advantages of the current ImageDB implementation:
-
it doesn’t rely on additional database software; it uses the filesystem
-
operations to do with retrieving and storing files in the filesystem are fairly easy and naturally implemented including hierarchical storage
-
used by acts_as_image_file (rails plugin)
-
there is no syncing between the filesystem and ImageDB since ImageDB’s persistence layer is the filesystem
-
some sort of syncing is required if you use it in conjunction with another db
-
acts_as_image_file (active record) uses imageDB; it currently defines and after_save callback to look for image name changes
-
-
-
You need imagemagick; or at least the bin/convert and bin/identify binaries that do most of the hard work.
-
You’ll need to install the newgem gem to run rake related utilities sudo gem install newgem
-
A gem is build in pkg/ directory sudo gem install pkg/newgem-<version>
-
To test (requires newgem) rake test
-
Build documentation: rake redocs
-
(requires newgem)
-
(The MIT License)
Copyright © 2010 Daniel Bush
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ‘Software’), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED ‘AS IS’, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.