Image Datasets

From OSF Wiki
Jump to: navigation, search

The image datasets used by OSF (or images within other datasets) are displayed within OSF using the Image Gallery component. This document explains how to initially create the source images and then to create thumbnails for them.

Source Images

The thumbnail generation program (see next) that we recommend only processes images in *.png, *.jpg, *.gif and *.bmp formats. Please restrict your input images to these formats.

Images may be of any dimensional and file size you wish. Try to name all images consistently (mixed or lower case, use of underscores or not, consistent file extensions, etc.) and store related images in the same subdirectory location.

Creating Thumbnails

The program we recommend for generating thumbnails is ThumbGen, a straightforward, free desktop application for Windows. ThumbGen is the recommended program because it allows you to fix the height of the thumbnail, while allowing the width to vary based on starting dimensions.

Once installed and started, here is the basic ThumbGen screen:

Thumbgen.png

Note that the thumbnail height should be set to 61 pixels (the standard for the gallery).

Decide upon a standard prefix for your thumbnails (we use tb_, but you may assign any prefix or suffix). This assignment will be appended automatically when the thumbnails are created.

Also, you must indicate which of the file formats you are currently processing. (If you have multiple formats in your source images, you will need to process multiple times and switch the formats).

To create the thumbs, merely select the image files in your images subdirectory and drag them into the main files area shown for ThumbGen. Then, when you pick the Create Thumbnails button, they rapidly convert and show the success green checkmark as is shown above.

When all thumbnails are created, we move all of them into a subdirectory ("/thumbs" in our example) to keep the thumbnails and main images separate but linked.

Image References in irON

Of course, you may load images in many different ways using the irON notation. In this section, we will use the commON format for our example.

In the commON file we provide a URI for both the main image (e.g., &imageUrl) and the thumbnail (e.g., &thumbnailUrl). Note the subdirectory differences and the thumbnail prefix as well (e.g., tb_).

After uploading the dataset (see further here), these images and their thumbnails are now ready to go.

Images dataset.png