QPix v2.2x

An image database step by step


Chapter index | Step: 1 - 2 - 3 - 4 - 5 - 6

Introduction


Building a simple database is the best way to see how QPix fits in your projects. Reading this manual further will give you more information which you can convert to inspiration and build great image databases. The material in this chapter is coarsely based on the demo database that is included, non compiled, in the QPix distribution package.

A basic image database needs a handful of image-related functions. These include the identification of image files, reading of image properties, creation and compression of thumbnails, storage of thumbnails and textual information in the datafile, display of thumbnails, and access to the original media.

We will now see how these can be accomplished with 4D and QPix. For storing image information in the database we will use the [Images] table that has the following structure:

xThumbnail_

Picture The image's thumbnail, compressed with QuickTime

FullPath

Text The full pathname to the original image on disk

Width

Longint The image's width

Height

Longint The image's height

Depth

Longint The image's color depth in bits

HorzRes

Longint The image's horizontal resolution

VertRes

Longint The image's vertical resolution

We are now ready to write the code. The steps are the following: