⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 0249-0251.html

📁 linux-unix130.linux.and.unix.ebooks130 linux and unix ebookslinuxLearning Linux - Collection of 12 E
💻 HTML
字号:




<HTML>

<HEAD>

<TITLE>Developer.com - Online Reference Library - 0672311623:SAMS TEACH YOURSELF LINUX IN 24 HOURS:Graphics Tools</TITLE>

<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
<SCRIPT>
<!--
function displayWindow(url, width, height) {
        var Win = window.open(url,"displayWindow",'width=' + width +
',height=' + height + ',resizable=1,scrollbars=yes');
}
//-->
</SCRIPT>
</HEAD>

 -->




<!-- ISBN=0672311623 //-->

<!-- TITLE=SAMS TEACH YOURSELF LINUX IN 24 HOURS //-->

<!-- AUTHOR=BILL BALL, STEPHEN SMOOGEN //-->

<!-- PUBLISHER=MACMILLAN //-->

<!-- IMPRINT=SAMS //-->

<!-- PUBLICATION DATE=1998 //-->

<!-- CHAPTER=16 //-->

<!-- PAGES=0243-0258 //-->

<!-- UNASSIGNED1 //-->

<!-- UNASSIGNED2 //-->







<P><CENTER>

<a href="0243-0248.html">Previous</A> | <a href="../ewtoc.html">Table of Contents</A> | <a href="0252-0255.html">Next</A>

</CENTER></P>



<A NAME="PAGENUM-249"><P>Page 249</P></A>









<TABLE BGCOLOR=#FFFF99><TR><TD>TIME SAVER</TD></TR><TR><TD>

<BLOCKQUOTE>

Not all graphics conversion programs included with your Linux distribution

read the standard input and write to the standard output. Read the manual pages

for any desired conversion programs before experimenting with pipes on

the command line. Also, be cautious: preview or print the results of your

conversions before discarding original files to make sure you achieve the effect

you want, and that the resulting graphic does not suffer loss of image quality.

</BLOCKQUOTE></TD></TR></TABLE>





<P>If you don't want to experiment with complex pipes, you may want to try using the

convert command, one of seven programs in the ImageMagick package (discussed later in

the section, &quot;Graphics Editing with ImageMagick&quot;). Using the

convert command is an alternative way to translate files. Found under the

/usr/bin directory, this command translates more than 75 different graphics file formats (even some not listed in Table 16.1).

The convert program works by recognizing different file extensions on the command line,

as shown in the following example.

</P>



<!-- CODE SNIP //-->

<PRE>

# xwd &gt;graphic.xwd

# convert graphic.xwd graphic.tiff

</PRE>

<!-- END CODE SNIP //-->



<P>Again the xwd client is used to create an X11 window dump graphic. Then the

convert command is made to create a .tiff file by specifying the .tiff extension on the second,

or output file on the command line. For details about using the convert command, see

the ImageMagick and convert command manual pages.

</P>



<H4><A NAME="ch16_ 6">

Graphic Editing with GIMP

</A></H4>



<P>Although you can change or manipulate graphics from the command line, if you use

X11, it can be a lot more fun to interactively work with files using an image processing

program. One of the best and newest graphics tools for Linux is GIMP, the GNU

Image Manipulation Program by Spencer Kimball and Peter Mattis (see Figure 16.1).

</P>



<P>This is a capable and complex program with many features. If you've worked with

image-editing programs on other operating systems, you'll appreciate the tools and filters

included with this program. The GIMP features

</P>



<UL>

<LI>     9 program operation menus

<LI>     21 different editing tools

<LI>     109 different plug-in filters and tools to create image effects or perform operations

<LI>     Multiple image windows, handy for cutting and pasting or multiple views of a file

</UL>





<A NAME="PAGENUM-250"><P>Page 250</P></A>









<UL>

<LI>     Multiple layers for each image, so that effects may be superimposed

<LI>      Six floating windows and dialog boxes for selecting tools, brushes, colors, or patterns

<LI>      Multiple undo levels, handy if you make mistakes!

<LI>      Import and export of 24 different graphics formats

</UL>





<P>Figure 16.1<BR>

The GIMP image<BR> editor is an impressive<BR> X11 client with

many<BR> professional features,<BR> including nearly 100<BR> different filters

for<BR> manipulating graphics.<BR>

<a href="javascript:displayWindow('images/ch16fg01.jpg', 288, 216)"><img src="images/tn_ch16fg01.jpg"></a><BR>

</P>





<P>

You'll need nearly 23 megabytes of hard drive space to

install GIMP, its software libraries, support files, and related directories. The main GIMP files are installed under the

/usr/share/gimp/X.XX directory, where X.XX is the current version. A library of GIMP plug-ins is

located under the /usr/lib/gimp/X.XX/plug-ins directory, where

X.XX is the current version. Plug-ins are compiled modules, or programs run by GIMP from different menus.

</P>



<P>This program has 11 different command-line options, but does not support X11

Toolkit options such as geometry settings. You can specify a graphic file on the command

line. GIMP attempts to load and interpret the file according to the file's extension.

Starting GIMP is easy; simply type the following.

</P>



<!-- CODE SNIP //-->

<PRE>

# gimp &amp;

</PRE>

<!-- END CODE SNIP //-->





<P>

When you first start GIMP, you'll be presented with a large window that provides

details about various GIMP resource files. You'll be asked to confirm installation of a

directory called .gimp in your home directory. This directory contains seven different files

and subdirectories that specify how GIMP works, and lists your preferences for tools,

brushes, and plug-ins.

</P>





<A NAME="PAGENUM-251"><P>Page 251</P></A>









<P>The file gimprc under your .gimp directory contains settings, such as default brushes,

patterns, palettes, and temporary directories you can customize. You also can specify the type

of measurement to be used in your rulers, such as pixels, inches, or centimeters, and

whether or not GIMP performs auto-saving of your image files as you work.

</P>

<P>



<CENTER>

<TABLE BGCOLOR="#FFFF99">

<TR><TD><B>

CAUTION

</B></TD></TR>

<TR><TD>

<BLOCKQUOTE>

The version of GIMP installed on your system lacks documentation, but

you should know that if you edit large image files, you may quickly run out of

disk space because GIMP creates large temporary files during editing sessions (this

is not unusual, as even commercial image editing applications typically

require swap storage three times larger than system memory). If you have a

separate hard drive with a lot of room, change the swap-path (not the same as your

Linux swap partition!) setting in the gimprc file to point to a directory on that drive.

If you're really tight on memory and hard drive space, you

can uncomment the stingy-memory-use option. On the other hand, if you have a lot of system

memory, change the tile-cache size to force GIMP to use less swap space (and run faster).

</BLOCKQUOTE></TD></TR>

</TABLE></CENTER>

</P>

<P>Once GIMP is running, you can tear off different dialog boxes and windows by using

the dialog menu item under the GIMP File menu. If you have an active image window,

access the complete GIMP menu system by pressing your right mouse button while the

cursor is over your image. The various menus will cascade, and you can select the file, edit,

or other menu operations by dragging your cursor through the menus.

</P>



<P>GIMP does not come with a manual page, but you'll find some documentation under

the /usr/doc/gimp directory. For the latest news and details about this program, browse to

the following site:

</P>



<!-- CODE SNIP //-->

<PRE>

<a href="http://www.gimp.org">

http://www.gimp.org</A>

</PRE>

<!-- END CODE SNIP //-->



<P>You'll find copies of the latest GIMP and links to GIMP Frequently Asked Questions

lists, a GIMP tutorial, and new plug-ins.

</P>







<H4><A NAME="ch16_ 7">

Graphics Editing with ImageMagick

</A></H4>



<P>The ImageMagick package, by John Cristy, is a collection of seven programs you'll

find installed on your system. Some of these commands require the X Window System,

while others may be used from the command line. The

convert command has already been discussed in this hour, but you may find some of the other utilities useful when you

want to manipulate graphics:

</P>



<UL>

<LI>    animate Displays a series of graphics; requires X11

<LI>    combine Combine, overlay multiple images into a single image

<LI>    convert Convert or changes graphic files

<LI>    display Display program with menus for manipulating images; requires X11

</UL>







<P><CENTER>

<a href="0243-0248.html">Previous</A> | <a href="../ewtoc.html">Table of Contents</A> | <a href="0252-0255.html">Next</A>

</CENTER></P>











</td>
</tr>
</table>

<!-- begin footer information -->









</body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -