Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

pnmmontage(1) [minix man page]

pnmmontage(1)                                                 General Commands Manual                                                pnmmontage(1)

NAME
pnmmontage - create a montage of portable anymaps SYNOPSIS
pnmmontage [-?|-help] [-header=headerfile] [-quality=n] [-prefix=prefix] [-0|-1|-2|...|-9] pnmfile... DESCRIPTION
Packs images of differing sizes into a minimum-area composite image, optionally producing a C header file with the locations of the subim- ages within the composite image. OPTIONS
-?, -help Displays a (very) short usage message. -header Tells pnmmontage to write a C header file of the locations of the original images within the packed image. Each original image gen- erates four #defines within the packed file: xxxX, xxxY, xxxSZX, and xxxSZY, where xxx is the name of the file, converted to all uppercase. The #defines OVERALLX and OVERALLY are also produced, specifying the total size of the montage image. -prefix Tells pnmmontage to use the specified prefix on all of the #defines it generates. -quality Before attempting to place the subimages, pnmmontage will calculate a minimum possible area for the montage; this is either the total of the areas of all the subimages, or the width of the widest subimage times the height of the tallest subimage, whichever is greater. pnmmontage then initiates a problem-space search to find the best packing; if it finds a solution that is (at least) as good as the minimum area times the quality as a percent, it will break out of the search. Thus, -q 100 will find the best possible solution; however, it may take a very long time to do so. The default is -q 200. -0, -1, ... -9 These options control the quality at a higher level than -q; -0 is the worst quality (literally pick the first solution found), while -9 is the best quality (perform an exhaustive search of problem space for the absolute best packing). The higher the number, the slower the computation. The default is -5. NOTES
Using -9 is excessively slow on all but the smallest image sets. If the anymaps differ in maxvals, then pnmmontage will pick the smallest maxval which is evenly divisible by each of the maxvals of the original images. SEE ALSO
pnmcat(1), pnmindex(1), pnm(5), pam(5), pbm(5), pgm(5), ppm(5) AUTHOR
Copyright (C) 2000 by Ben Olmstead. 31 December 2000 pnmmontage(1)

Check Out this Related Man Page

IMAGEJPEG(3)								 1							      IMAGEJPEG(3)

imagejpeg - Output image to browser or file

SYNOPSIS
bool imagejpeg (resource $image, [string $filename], [int $quality]) DESCRIPTION
imagejpeg(3) creates a JPEG file from the given $image. PARAMETERS
o $ image -An image resource, returned by one of the image creation functions, such as imagecreatetruecolor(3). o $filename -The path to save the file to. If not set or NULL, the raw image stream will be outputted directly. To skip this argument in order to provide the $quality parameter, use NULL. o $quality -$quality is optional, and ranges from 0 (worst quality, smaller file) to 100 (best quality, biggest file). The default is the default IJG quality value (about 75). RETURN VALUES
Returns TRUE on success or FALSE on failure. EXAMPLES
Example #1 Outputting a JPEG image <?php // Create a blank image and add some text $im = imagecreatetruecolor(120, 20); $text_color = imagecolorallocate($im, 233, 14, 91); imagestring($im, 1, 5, 5, 'A Simple Text String', $text_color); // Set the content type header - in this case image/jpeg header('Content-Type: image/jpeg'); // Output the image imagejpeg($im); // Free up memory imagedestroy($im); ?> The above example will output something similar to:[NOT DISPLAYABLE MEDIA]Output of example : Outputting a JPEG image Example #2 Saving a JPEG image <?php // Create a blank image and add some text $im = imagecreatetruecolor(120, 20); $text_color = imagecolorallocate($im, 233, 14, 91); imagestring($im, 1, 5, 5, 'A Simple Text String', $text_color); // Save the image as 'simpletext.jpg' imagejpeg($im, 'simpletext.jpg'); // Free up memory imagedestroy($im); ?> Example #3 Outputting the image at 75% quality <?php // Create a blank image and add some text $im = imagecreatetruecolor(120, 20); $text_color = imagecolorallocate($im, 233, 14, 91); imagestring($im, 1, 5, 5, 'A Simple Text String', $text_color); // Set the content type header - in this case image/jpeg header('Content-Type: image/jpeg'); // Skip the filename parameter using NULL, then set the quality to 75% imagejpeg($im, NULL, 75); // Free up memory imagedestroy($im); ?> NOTES
Note JPEG support is only available if PHP was compiled against GD-1.8 or later. Note If you want to output Progressive JPEGs, you need to set interlacing on with imageinterlace(3). SEE ALSO
imagepng(3), imagegif(3), imagewbmp(3), imageinterlace(3), imagetypes(3). PHP Documentation Group IMAGEJPEG(3)
Man Page