- IMAGE TYPES
- SEE ALSO
image_tile - Tile images to form a larger image
Re-create an image by tiling many sub-images which are in turn chosen for their likeness to a part of the original.
In other words, you give
image_tile a base image and a list of directories to find other images in. It then tiles small versions of the images over the original image in such a way that you can still make out the original if you squint hard enough.
Functions a little like the Filters/Artistic/Mosaic plugin, but with images as the tiles.
- Number of tiles
The number of tiles in the X and Y directions must be given. This is the number of sub-images that will be tiled across and down your original image.
- Number of cells
In each tile, the image tiler will sample color areas to determine a match. The more color areas you sample, the more accurate the match, but this also increases memory, disk and time usage. The default of 4 cells in each direction is good for most tiling which is meant to be viewed on-line. Print-quality tiling will have to use more samples to get even finer details right.
- Duplicate weight
This is a number from 0 to 100 (actually, there is no real upper bound, but 100 is a practical upper limit). This is a weight applied to each sub-image each time it has been selected. Thus, if you use a hight weight, images will tend to be chosen only once. If you use a low weight, images will be chosen as many times as they happen to be the best fit. A weight of 0 will lead to the most accurate match, but due to the repetition of some images, you may find the resulting image to be difficult to make out.
- Sub-Image directories
This is a space-separated list of the directories in which The Gimp will be able to load sub-images. You may use csh-style file "globing" such as
- Delete cached image samples
This toggle button will tell the image tiler whether or not to delete the cached image samples that it creates while reading the sub-images. If you are planning to attempt matching these sub-images against this base image again (say, adding a few new files, or brightening the base image first), you will probably want to keep them around, as the time savings is huge. However, since these samples are based on aspect ratio and number of cells, you cannot re-use the samples if you change the number of tiles or number of cells. Sorry.
image_tile requires a large number of image to work from. This is because it needs to divide up your original image and for each tile, find another image which looks like that tile. This can require anywhere from 2000 to tens of thousands of component images.
image_tile will use as much disk space as is required to store the sampling information that it creates for each of the sub images. However, its use of memory is much more conservative. The assumption being that a lot more people have a Gig of disk free than a Gig of RAM. So, expect a large file to be created in your .gimp directory (you can select automatic cleanup of this file if you wish).
[PF_INT32, "xtiles", "Number of tiles (X)", 10], [PF_INT32, "ytiles", "Number of tiles (Y)", 10], [PF_INT32, "xcells", "Number of sample cells per tile (X)", 4], [PF_INT32, "ycells", "Number of sample cells per tile (Y)", 4], [PF_INT32, "dupweight", "Duplicates (0[lots] - 100[none])", 5], [PF_STRING, "dirs", "Sub-image directories (space speparated)"], [PF_TOGGLE, "cleanup", "Delete cached image samples", 0]
Written in 1998 (c) by Aaron Sherman <firstname.lastname@example.org>
Most of the bugs in the image tiler are actually just design limitations. For example:
The images must all be the same aspect ratio, so image_tile will crop them to match the target aspect ratio. Because of the large number of images involved, it is impractical to specify a crop area for each one, so the center of the image is chosen.
If The Gimp library were multi-threaded the image tiler would read more than one sub-image at a time.
Directory selection is crude. Gimp needs a file/directory selection model for plug-ins similar to the color selection model.
If some of your sub-images are bad, the image tiler will display an error message when trying to load them. This can result in a lot of messages for a multi-thousand image database.
URLs should be handled as image directories.
Some text describing what image directory is being searched would be nice, but this would require more code than I want to write right now.
TODO: o Fix undo o Handle input drawable correctly (for working on selections) o Find faster ways to sample sub-images. o More control over cropping o Scaling vs cropping of sub-images o Better color matching algorithms o Test (fix?) non-interactive use... o Allow tile aspect selection independant of base image DONE: o 04-22-2001, email@example.com: fix problems with functions that changed number of arguments 12/5/03: <firstname.lastname@example.org> s/gimp_convert/gimp_image_convert/ s/gimp_drawable_image/gimp_drawable_get_image/
Copyright Aaron Sherman. This plugin may be distributed under the same terms as GIMP itself.