GNOME Bugzilla – Bug 132532
Add a contact sheet plug-in / script
Last modified: 2010-06-29 18:32:45 UTC
It would be nice to have the facility to print several images together on one page (as for example in CorelPhotoPaint). This is useful for index sheets as well as high quality layouts.
This has IMHO nothing to do with printing. Putting several images on one image is a very useful feature which I missed lots of times. GIMP should offer a "Contact Sheet" facility which would do this from images that are already open of from images on disk.
This would be a useful feature for GIMP but why not use one of the many thumbnailing programs that allow you to make a contact sheet and print from there?
This question was asked again on the gimp user mailing list. Some answers (heavily edited for brevity): Date: Fri, 9 Apr 2004 08:41:24 -0500 From: Patrick Shanahan <wideglide@speedymail.org> Subject: Re: [Gimp-user] Contact sheet in gimp? > > > I'm looking in the Gimp for the same function as contact sheet in > > > photoshop. make that: from ImageMagick, montage. And another answer: Date: Fri, 9 Apr 2004 10:59:20 -0700 From: Carol Spears <carol@gimp.org> Subject: Re: [Gimp-user] Contact sheet in gimp? On Thu, Apr 08, 2004 at 09:46:15PM -0400, sean wrote: > I'm looking in the Gimp for the same function as contact sheet in python script ... it spits html out, but could be easily modified to other formats. here is the page it is producing lately: http://carol.gimp.org/gallery/reflections/whole_set.html the script is: http://carol.gimp.org/files/camera-gallery.py.txt
*** Bug 149802 has been marked as a duplicate of this bug. ***
A comment from bug #149802: Some photo editing programs offer the possibility to combine several images in one page with a preselected layout. An example of this can be seen in http://www.planetphotoshop.com/jim69.html . Similar results can be obtained with the composite method in ImageMagick. Would be nice to have a GIMP plug-in that does something similar.
Tiny-Fu comes with a contact sheet script. It's not perfect yet, but might be a place to start more sophisticated solutions from.
Does the original request ask for 'contact sheet' or 'picture package' functionality? These are two different things in PS. The title of this report suggests the former, the content the latter.
Maurits, please don't use PS speak here. Not everyone knows about these PS plug-ins, so please explain what they are doing and how they are different.
The `contact sheet' in PS is also often called a gallery. An example of such a gimp plug-in can be found as http://skylab.org/~plumpy/gg/. There are numerous programs for that on Freshmeat. They are most often used to create small thumbnails for display large amounts of pictures on the web. Clicing on one of the thumbnails shows the full image. Selection of the images is mostly done by just selection a directory from which to generate the contact sheet. The `Picture package' in PS and other programs is different. This let you put any amount (typically 2 - 15) pictures on one single page (for example 8 by 10 inch), according to a template that discribes the layout of such a page. This is basically a list of rectangles with their offset (x, y) and width and height. Selection of the images is done manually. The functionality of these plug-ins somewhat overlap, but I don't think we should try to combine them in one plug-in. Besides, as mentioned above there is already a nice plug-in to generate contact sheets. The title of this enhancement request is a bit misleading, since I suspect that the author meant to have a 'picture package' plug-in. To summarize: a `contact sheet' puts stuff on the web, the `picture package' creates one page for printing. Hope this explains the functionality a bit.
That is a very uncommon definition of a contact sheet. A contact sheet doesn't necessarily have anything to do with the Web. It's meant to be printed and gives an overview on a number of pictures. In that regard it is comparable with what you call 'picture package' but would probably be less flexible when it comes to the page layout.
In that case I would propose to have a `Picture Package' (we need to look for an alternative name, Picture Composer?) that uses templates which describe the page layout. The contact sheet layout could be described as a template or the user could create this template (hidden as an advanced option maybe) on the fly by specifying the number of rows and columns to be displayed in one page. We could also still provide this functionality as a separate plug-in, sharing the same code with the picture package to avoid UI cluttering.
Basically such a plug-in doesn't make much sense in GIMP. I don't question that it would be useful but there is almost nothing that GIMP can offer for such a plug-in so it could very well be a standalone application. Let's look at how you would do this as a GIMP plug-in: A naive approach would be to create a large image and paste scaled versions of the selected images. This would either take a huge amount of memory or it would make for a low quality printout. The way this would have to be implemented is by layouting the original images and sending this layout to a printer. This would need a library like libgnomeprint. So the implementation wouldn't use any GIMP functionality at all. There isn't even a convenient way how plug-ins can select multiple images to open from disk. I suggest to close this report as WONTFIX and point people to already available software such as GNOME photo printer (http://www.fogman.de/gpp/index.html).
The naive approach is probably what the other programs are doing, since they just generate an image, optionally with a layer for each of the images that it's composed of. If we copy this approach then there is a lot of GIMP functionality that is going to be used, like creating the image, adding layers, maybe adding text, dragging and dropping currently openened pictures into the layout, etc. Implementing such a plug-in is almost trivial in GIMP. I agree that this probably could also be done with other programs, but a lot of people seem to prefer to start just one single program and do all their work from there. Remember we even have an imagemap plug-in in the GIMP?
Created attachment 30688 [details] Python-fu script to perform desired task This is a Python-fu script that can arrange N images in a larger GIMP image, having as inputs: rows, cols, width, height, spacing (all in pixels), and a space separated list of desired image names. There is also a hack to individualy rotate images if needed.
My python-fu won't solve the bug by itself, as it would have to be expanded to a full plugin, at least with a decent file selection scheme before being included with The GIMP. Nonetheless, people needing the feature now just have to download it, save to .gimp-2.0/plug-ins and have fun.
Created attachment 30697 [details] Moin. Python-fu was not erasing loaded images from memory.
Created attachment 30731 [details] [review] Improved python-fu which implements request I've added an option to auto-rotate images so they pick the largest area possible, and the possibility to enter the file names as a regular expression. Also improved the layout. The only thing it lacks to be a definitive solution to this bug is to have a better way of selecting multiple-files. This apart, it is usable, and IMO, it is more pratical than using an external program for this task.
You might want to put this script into the plug-in registry, where it can be found by others more easily.
The contact sheet script in Tiny-Fu was only meant to demonstrate some of the new features available to scripts. If someone has ideas on changes/enhancements to make it more generally useful then feel free to open a new enhancement bug report against Tiny-Fu.
The Contact Sheet script sneaked into SVN with the transition to Tiny-Fu. It is currently installed by default even though it has, in my opinion, several problems. It seems unintuitive to use and it doesn't seem to create any output for me, nor does it give me an error message or any indication that it would have created files somewhere. I stronly suggest that either the script is fixed or that it is removed, or at least not installed. We should look at this before 2.4 is released. This doesn't mean that we absolutely need to ship with a contact sheet script, but we should either ship a working one or none at all.
The script used to work and it hasn't been touched in a long time. Possibly the script expects some behaviour from GIMP which is no longer valid in recent versions. I will have to track down the problem. Once the script is working again it may be easier to decide if its UI needs much in the way of changes.
If it isn't ready within a week from now we will have to remove it from the distributed files.
2007-05-15 Kevin Cozens <kcozens@cvs.gnome.org> * plug-ins/script-fu/scripts/contactsheet.scm: Use 'img' and not 'new-img' in make-thumbnail-size routine. Moved menu entry from Xtns/Utils to Xtns/Utilities. See bug #132532. The script works again. I will hold off closing this report until possible UI changes are dealt with. Also, need to figure out why a dialog box never appears from a call to gimp-message made near the end of the script.
If you rename the menu, you also need to rename it in script-fu.c: 2007-05-15 Sven Neumann <sven@gimp.org> * plug-ins/script-fu/script-fu.c (script_fu_extension_init): renamed "Utils" to "Utilities". Also the script still needs to be added to the list of translatable files in po-script-fu/POTFILES.in. I would like to suggest that instead of writing files to disk, the script should create a Contact Sheet image and open a display for it.
Since this script isn't quite ready yet and since it has not been added to the list of translatable files yet, it is not going to be included with the 2.4 release. We should have a look at it again as soon as we have a gimp-2-5 branch. 2007-07-26 Sven Neumann <sven@gimp.org> * plug-ins/script-fu/scripts/Makefile.am: moved contactsheet.scm to test_SCRIPTS. We should look at it again after the 2.4 release.
I tried the Python but it was a bit too crude IMO. Would be nice to have I guess but not something that is essential to get into 2.6. Putting on milestone Future.
Closing as WONTFIX as suggested a while back, someone who has a working and welld-designed patch, feel free to reopen.