Release Notes for p4thumb, the Perforce thumbnail generator Release 2005.1 May 16, 2005 The Perforce thumbnail daemon creates thumbnails of graphics files managed by Perforce and stores the thumbnails in the server. P4V displays the thumbnails in the right pane when you choose View>Show Files As>Thumbnails. P4V does not communicate directly with the thumbnail daemon but rather obtains thumbnails from the server. By default, P4V displays thumbnails for image files in the workspace. P4V can also display thumbnails that have been stored on the server by the thumbnail generator (p4thumb). When you start the thumbnail daemon against a server for the first time, it creates thumbnails for all graphics file versions in its client view. When new versions of images are added to the depot, the thumbnail daemon adds thumbnails for them. The thumbnail daemon can be run on any Windows machine. To avoid affecting Perforce server performance, run p4thumb on a machine other than the server machine. The thumbnail daemon can communicate with Perforce servers on any other platform, as long as the server is accessible through the network. This README file is intended for Perforce administrators who need to configure, start and stop the Perforce thumbnail daemon (p4thumb). p4thumb can create thumbnails for the following file formats: * PSD (Photoshop) * MB (Maya) * MAX (3ds Max) * TGA * BMP * GIF * JPEG * MNG * PBM * PGM * PNG * PPM * XBM * XPM p4thumb is supported on Windows platforms and requires a 2005.1 server. System Requirements (disk space) Thumbnail generation p4thumb requires enough disk space to (temporarily) hold the largest set of image files you have (or plan to ) submit in a single changelist. For best performance, it is advisable to run p4thumb on a machine that has enough RAM to hold the largest image in memory. Having less RAM slows down thumbnail generation, but has no other side effects. When you run p4thumb, the Perforce server requires more disk space to store thumbnails. To calculate the approximate disk space usage, create a client specification that maps the image files for which you want thumbnails, then obtain the number of revisions for those files by issuing the following command: p4 files -a //image-client/... | wc Multiply the number of revisions by 40 to get the number of kilobytes of storage the server needs. This value is a worst-case estimate. p4thumb generates thumbnails as .png files, which compress best when images are simple. The complexity of your images has significant impact on the amount of disk space that PTD consumes. Checkpoints and journals The thumbnails are stored in both the journal and checkpoint files in hexidecimal format. Checkpointing, restoring from checkpoints, and journalling run more slowly as a result, and the resulting files are larger, so ensure that your server machine has adequate disk space. Running p4thumb does not noticeably slow the Perforce server down, though the retrieval and display of thumbnails does have some effect on P4V performance. Installing p4thumb p4thumb does not need to run on the same machine as the Perforce Server, though it does require network access to the machine where the server runs. To avoid affecting server performance, run p4thumb on another machine. To install p4thumb: 1. Download the p4thumb zip file from the Perforce Web site Downloads page. 2. Unzip the file on the machine where you intend to run it. 3. On the server where your image files reside, create a client specification for p4thumb that maps only the files for which you want thumbnails. For example, this view maps all of the image formats that Qt supports, plus formats for which Perforce created plugins: //depot/....ppm //p4thumb/....ppm //depot/....PPM //p4thumb/....PPM //depot/....bmp //p4thumb/....bmp //depot/....BMP //p4thumb/....BMP //depot/....jpg //p4thumb/....jpg //depot/....JPG //p4thumb/....JPG //depot/....bpm //p4thumb/....bpm //depot/....BPM //p4thumb/....BPM //depot/....gif //p4thumb/....gif //depot/....GIF //p4thumb/....GIF //depot/....pgm //p4thumb/....pgm //depot/....PGM //p4thumb/....PGM //depot/....png //p4thumb/....png //depot/....PNG //p4thumb/....PNG //depot/....mng //p4thumb/....mng //depot/....MNG //p4thumb/....MNG //depot/....xbm //p4thumb/....xbm //depot/....XBM //p4thumb/....XBM //depot/....xpm //p4thumb/....xpm //depot/....XPM //p4thumb/....XPM //depot/....max //p4thumb/....max //depot/....MAX //p4thumb/....MAX //depot/....tga //p4thumb/....tga //depot/....TGA //p4thumb/....TGA //depot/....psd //p4thumb/....psd //depot/....PSD //p4thumb/....PSD 4. (optional)Install additional image plugins you want to use. Get the plugin files from the Perforce public depot and copy the .dll files to a folder called "imageformats" in the same folder as the p4thumb executable and put the dlls in the folder. p4thumb automatically loads them the next time it starts. Note: if you want to see thumbnails for Photoshop, Maya, and 3DS filetypes for local files that are not in the depot or files that are checked out, you need to install the corresponding plugins on the client computer, in the directory where P4V is installed. Starting p4thumb Run one instance of p4thumb for each server in which you want to enable thumbnails. Do not run multiple instances of p4thumb using the same client view and server. (You might improve performance by running multiple instances with differing client views, for example, one instance for each large project.) Note that the user associated with p4thumb does not need to be dedicated to p4thumb, but the workspace must be dedicated for use only by p4thumb. Note: The first time you start p4thumb for a specified Perforce server, it creates thumbnails for all images in its client view, which is likely to affect server performance. After the initial thumbnails are created, p4thumb does not have a significant effect on server performance. To start p4thumb, issue the following command in a command window, specifying the server containing the images files, the workspace for p4thumb to use, and the Perforce username associated with p4thumb activity. p4thumb -p -c -u [flags] Flags -t : Specifies the interval for p4thumb to poll the Perforce Server for new or changed images. Specify a value from 1 to 2147483 (25 days). The default is 30 seconds. -n [<,stopchangelist>]: Specifies a range of changelists to be processed. If you specify a range of changelists, p4thumb exits after processing the range. If you specify only the start changelist, p4thumb processes from the specified changelist to the most recent, then continues to run, polling normally. -d: Erases the thumbnails in the client view that are associated with the revisions in the range of changelists specified with the -n flag. -f: Forces creation of a thumbnail even if there already is one present for the given revision. Only valid if you specify the -n flag. -L : Specifies the location and name of the p4thumb log file (ex: C:\Program Files\perforce\thumblog.txt). By default, log output is displayed on the system console. -v 0|1|2: Specifies logging level: level 0 logs errors, level 1 logs errors plus all p4 commands, level 2 logs errors, commands, and plus hex-encoded thumbnails. -help: display p4thumb flags. -V: display version information. Stopping p4thumb In the command window where you started p4thumb, type CTRL-C. By default, when you restart p4thumb, it resumes processing starting with the last changelist that was processed. p4thumb maintains a counter for this purpose on the specified server. Starting p4thumb from a specified changelist using the "-n" flag resets this counter if it exceeds the specified value. Deleting thumbnails does not affect the counter. Adding thumbnails for proprietary image formats p4thumb is based on technology created by Trolltech, which can be extended to support other image formats. If you want to write a plugin for an image format not listed above, note that Trolltech offers a free development version for Unix/X11 and Mac OS X, but development of Windows plugins requires a paid license. See www.trolltech.com for details, and search for QImageFormatPlugin information. Perforce provides sample source code and links to QT documentation in our public depot, including complied plugins for 3DS, Maya, Photoshop, and .tga files. See //public/perforce/utils/image-plugins/ to obtain these files.