[ Pobierz całość w formacie PDF ]
.1 CONTINUEDFormat Type Conversion Program.uil Motif UIL icon ppmtouilconvert.upc Universal Product Code pbmupc.uyvy 16-bit YUV format convert.vicar convert (read-only)xv.viff Khoros Visualization image convert.x10bm X10 bitmap pbmtox10bm.xbm X11 bitmap pbmtoxbmxbmtopbmconvertxv.xim Xim file ximtoppm.xpm X11 pixmap ppmtoxpmxpmtoppmconvertgimpxv.xv xv thumbnail xvminitoppm.xvpic xv thumbnail file xvpictoppm.xwd X11 Window Dump pnmtoxwdxwdtopnmconvertgimpxv.ybm Bennet Yee face file pbmtoybmybmtopbm.yuv Abekas YUV file ppmtoyuvyuvtoppmconvert.zeiss Zeiss confocal file zeisstopnm.zinc Zinc bitmap pbmtozinc21 526-2 CH16 8/26/99 10:52 AM Page 367Graphic Tools 367Converting and Viewing GraphicsThere are a number of ways to convert graphic files to different formats using the pro-grams installed on your system.Several of the painting or drawing programs discussed inthis hour translate graphics, and many programs in Table 16.1 also work as filters inpiped commands (see Hour 6, Using the Shell, for details) to translate graphics.You can use different combinations of these commands to convert files.OpenLinux16users, such as graphics artists or system administrators, convert files for different rea-sons.Artists or casual users might want to import or export graphics for use by differentdrawing programs.System administrators might look for a side benefit of convertinggraphics to save disk space.In some instances, the savings can be considerable.Look atthe following example:# xwd >graphic.xwd# xwdtopnm graphic.xwd# convert graphic.xwd graphic.tiffHere, the xwd client is used to create an X11 window dump graphics file.The convertcommand then creates a.tiff file by specifying the.tiff extension on the second, oroutput, file on the command line.For details about using the convert command, see theImageMagick and convert command man pages.21 526-2 CH16 8/26/99 10:52 AM Page 369Graphic Tools 369Graphics Editing with GIMPYou can change or manipulate graphics from the command line, but if you use X11, it s alot more fun to interactively work with files using an image-processing program.One ofthe best and newest graphics tools for Linux is the GNU Image Manipulation Program,or the GIMP, by Spencer Kimball and Peter Mattis.This capable and complex program, shown in Figure 16.1, has many features.If you veworked with commercial software image-editing programs on other operating systems 16(such as Adobe PhotoShop), you ll appreciate the GIMP s tools and filters.The GIMPfeatures the following:9 program operation menus21 different editing tools81 brushes168 patterns123 different plug-in filters and tools to create image effects or perform operationsImport and export of 24 different graphics formatsMultiple image windows, handy for cutting and pasting or multiple views of a fileMultiple layers for each image, so that effects can be superimposedMultiple undo levels, handy if you make mistakesSix floating windows and dialog boxes for selecting tools, brushes, colors, or pat-ternsYou need nearly 23 megabytes of hard drive space to install GIMP and its soft-NEW TERMware libraries, support files, and related directories.The main GIMP files areinstalled under the /usr/X11R6/share/gimp and /usr/X11R6/lib/gimp/X.X directories,where X.X is the current version (1.0 at the time of this writing).The library directorycontains GIMP s plug-ins, which are compiled modules run by GIMP from differentmenus that create effects or alter an image or image selection.This program has 11 different command-line options (such as -help to show the list ofoptions) but does not support X11 Toolkit options, such as geometry settings.When youspecify a graphics file on the command line, GIMP attempts to load and interpret the fileaccording to the file s extension.Starting GIMP is easy; simply type the following:# gimp &Unless you use the --nosplash option, you see a small window that provides detailsabout various GIMP resource files while loading.21 526-2 CH16 8/26/99 10:52 AM Page 370370 Hour 16FIGURE 16.1The GIMP image edi-tor is an impressiveX11 client with manyprofessional features,including nearly 100different filters formanipulatinggraphics.The file gimprc under your.gimp directory can contain settings for default brushes, pat-terns, palettes, and temporary directories.This file is initially empty, but you can copythe default systemwide gimprc file and then edit the various settings according to yourneeds.Table 16.2 lists some common settings you can change.For example, to createyour own copy in your home directory, use the following:# cp /usr/X11R6/share/gimp/gimprc $HOME/.gimp/gimprccp: overwrite `.gimp/gimprc ? yIf you edit large image files, you can quickly run out of disk space becauseGIMP initially uses 10 megabytes of system memory and creates large tem-porary files during editing sessions (this is not unusual, as even commercialimage editing applications typically require swap storage three times largerthan system memory)
[ Pobierz całość w formacie PDF ]