📄 ch69.htm
字号:
<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>
-->
<font face="Arial,Helvetica" size="-1" color="#006666">
<b>Linux</b></font><p>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<H1></H1>
<UL>
<LI><A HREF="#Heading1">- 69 -</A>
<UL>
<LI><A HREF="#Heading2">Graphics Tools in Linux</A>
<LI>
<UL>
<LI><A HREF="#Heading4">The pbm Toolkit</A>
<LI><A HREF="#Heading5">Listing 69.1. The files from the pbmplus toolkit.</A>
<LI><A HREF="#Heading6">xv</A>
<UL>
<LI><A HREF="#Heading7">FIGURE 69.1.</A>
<LI><A HREF="#Heading8">FIGURE 69.2.</A>
<LI><A HREF="#Heading9">FIGURE 69.3.</A>
<LI><A HREF="#Heading10">FIGURE 69.4.</A>
</UL>
<LI><A HREF="#Heading11">Geomview</A>
<UL>
<LI><A HREF="#Heading12">FIGURE 69.5.</A>
<LI><A HREF="#Heading13">FIGURE 69.6.</A>
</UL>
<LI><A HREF="#Heading14">TIP</A>
<UL>
<LI><A HREF="#Heading15">FIGURE 69.7.</A>
</UL>
<LI><A HREF="#Heading16">The Mesa/OpenGL Toolkit</A>
<LI><A HREF="#Heading17">Listing 69.2. The makefile for sample programs.</A>
<LI><A HREF="#Heading18">TIP</A>
<LI><A HREF="#Heading19">Listing 69.3. A simple test program.</A>
<LI><A HREF="#Heading20">Summary</A>
</UL>
</UL>
</UL>
<P>
<HR SIZE="4">
<H2 ALIGN="CENTER"><A NAME="Heading1<FONT COLOR="#000077">- 69 -</FONT></H2>
<H2 ALIGN="CENTER"><A NAME="Heading2<FONT COLOR="#000077">Graphics Tools in
Linux</FONT></H2>
<H2 ALIGN="CENTER"><FONT COLOR="#000077"></FONT></H2>
<P><I>by Kamran Husain</I></P>
<P>IN THIS CHAPTER</P>
<UL>
<LI>The pbm Toolkit
<P>
<LI>xv
<P>
<LI>Geomview
<P>
<LI>The Mesa/OpenGL Toolkit
</UL>
<P><BR>
This chapter will introduce you to the following graphics tools and libraries available
under Linux:
<UL>
<LI>The Portable Bitmap Toolkit
<P>
<LI>The xv toolkit
<P>
<LI>Geomview for 3D geometric viewing
<P>
<LI>The Mesa/OpenGL toolkit for programming in OpenGL
</UL>
<H3 ALIGN="CENTER"><A NAME="Heading4<FONT COLOR="#000077">The pbm Toolkit</FONT></H3>
<P>The Portable Bitmap Toolkit (pbm toolkit), developed in 1991, is a very powerful
toolkit for converting graphics images from one format to another. The toolkit consists
of a set of programs that convert data images in a graphics format to or from a PBM
format.</P>
<P>The pbm toolkit has no graphical user interface, and all the commands operate
on images via the command-line interface. The toolkit programs all work by utilizing
the standard input and output features of programs. Each program in the toolkit reads
image data from its standard input and writes back to standard output.</P>
<P>The pbm toolkit is available from Linux FTP sites in both binary and source forms.
At the <TT>ftp://sunsite.unc.edu</TT> site, the files can be found in the <TT>pub/Linux/apps/graphics/convert</TT>
subdirectory. The file used for this chapter was the binary archive for Linux: <TT>pbmplus-10dec91-bin.tar</TT>.
Untar the files in a directory, and you then see a <TT>README</TT> file and <TT>man</TT>
and <TT>bin</TT> directories under the <TT>pbmplus10dec91</TT> directory. Point your
<TT>PATH</TT> to the <TT>bin</TT> directory. If you cannot get the binary files to
work in your installation, you can download the source code in the file <TT>pbmplus-10dec91_tar.Z</TT>.
Uncompress and untar the file to a subdirectory, and follow the instructions in the
<TT>README</TT> file to build the pbmplus executables.</P>
<P>The <TT>man</TT> directory contains a well-documented set of man pages for the
utilities in the toolkit. You can view the contents with the command</P>
<PRE><FONT COLOR="#0066FF">nroff -man filename
</FONT></PRE>
<P>where filename is the name of the man file you want to look at. The complete list
of binary files extracted from this tar archive is shown in Listing 69.1.
<H3 ALIGN="CENTER"><A NAME="Heading5<FONT COLOR="#000077">Listing 69.1. The
files from the pbmplus toolkit.</FONT></H3>
<PRE><FONT COLOR="#0066FF">$ ls pbmplus10dec91/bin
-rwxr-xr-x 1 root root 3568 Oct 21 1996 atktopbm
-rwxr-xr-x 1 root root 2112 Oct 21 1996 brushtopbm
-rwxr-xr-x 1 root root 2136 Oct 21 1996 cmuwmtopbm
-rwxr-xr-x 1 root root 3864 Oct 21 1996 fitstopgm
-rwxr-xr-x 1 root root 2628 Oct 21 1996 fstopgm
-rwxr-xr-x 1 root root 6532 Oct 21 1996 g3topbm
-rwxr-xr-x 1 root root 2844 Oct 21 1996 gemtopbm
-rwxr-xr-x 1 root root 6184 Oct 21 1996 giftoppm
-rwxr-xr-x 1 root root 2320 Oct 21 1996 gouldtoppm
-rwxr-xr-x 1 root root 2320 Oct 21 1996 hipstopgm
-rwxr-xr-x 1 root root 2504 Oct 21 1996 icontopbm
-rwxr-xr-x 1 root root 6108 Oct 21 1996 ilbmtoppm
-rwxr-xr-x 1 root root 2804 Oct 21 1996 imgtoppm
-rwxr-xr-x 1 root root 2540 Oct 21 1996 lispmtopgm
-rwxr-xr-x 1 root root 2248 Oct 21 1996 macptopbm
-rwxr-xr-x 1 root root 2144 Oct 21 1996 mgrtopbm
-rwxr-xr-x 1 root root 1884 Oct 21 1996 mtvtoppm
-rwxr-xr-x 1 root root 1844 Oct 21 1996 pbmlife
-rwxr-xr-x 1 root root 1836 Oct 21 1996 pbmmake
-rwxr-xr-x 1 root root 3104 Oct 21 1996 pbmmask
-rwxr-xr-x 1 root root 2996 Oct 21 1996 pbmreduce
-rwxr-xr-x 1 root root 3116 Oct 21 1996 pbmtext
-rwxr-xr-x 1 root root 2768 Oct 21 1996 pbmto10x
-rwxr-xr-x 1 root root 1796 Oct 21 1996 pbmtoascii
-rwxr-xr-x 1 root root 2424 Oct 21 1996 pbmtoatk
-rwxr-xr-x 1 root root 1964 Oct 21 1996 pbmtobbnbg
-rwxr-xr-x 1 root root 1988 Oct 21 1996 pbmtocmuwm
-rwxr-xr-x 1 root root 1956 Oct 21 1996 pbmtoepson
-rwxr-xr-x 1 root root 5552 Oct 21 1996 pbmtog3
-rwxr-xr-x 1 root root 2124 Oct 21 1996 pbmtogem
-rwxr-xr-x 1 root root 2988 Oct 21 1996 pbmtogo
-rwxr-xr-x 1 root root 2548 Oct 21 1996 pbmtoicon
-rwxr-xr-x 1 root root 2164 Oct 21 1996 pbmtolj
-rwxr-xr-x 1 root root 3020 Oct 21 1996 pbmtomacp
-rwxr-xr-x 1 root root 1916 Oct 21 1996 pbmtomgr
-rwxr-xr-x 1 root root 1884 Oct 21 1996 pbmtopi3
-rwxr-xr-x 1 root root 1876 Oct 21 1996 pbmtoplot
-rwxr-xr-x 1 root root 1876 Oct 21 1996 pbmtoptx
-rwxr-xr-x 1 root root 3596 Oct 21 1996 pbmtox10bm
-rwxr-xr-x 1 root root 3180 Oct 21 1996 pbmtoxbm
-rwxr-xr-x 1 root root 1836 Oct 21 1996 pbmtoybm
-rwxr-xr-x 1 root root 3556 Oct 21 1996 pbmtozinc
-rwxr-xr-x 1 root root 7288 Oct 21 1996 pbmupc
-rwxr-xr-x 1 root root 3532 Oct 21 1996 pcxtoppm
-rwxr-xr-x 1 root root 1572 Oct 21 1996 pgmbentley
-rwxr-xr-x 1 root root 5644 Oct 21 1996 pgmcrater
-rwxr-xr-x 1 root root 2140 Oct 21 1996 pgmedge
-rwxr-xr-x 1 root root 2164 Oct 21 1996 pgmenhance
-rwxr-xr-x 1 root root 1916 Oct 21 1996 pgmhist
-rwxr-xr-x 1 root root 3556 Oct 21 1996 pgmnorm
-rwxr-xr-x 1 root root 1868 Oct 21 1996 pgmoil
-rwxr-xr-x 1 root root 2372 Oct 21 1996 pgmramp
-rwxr-xr-x 1 root root 12404 Oct 21 1996 pgmtexture
-rwxr-xr-x 1 root root 2992 Oct 21 1996 pgmtofits
-rwxr-xr-x 1 root root 2468 Oct 21 1996 pgmtofs
-rwxr-xr-x 1 root root 2204 Oct 21 1996 pgmtolispm
-rwxr-xr-x 1 root root 6972 Oct 21 1996 pgmtopbm
-rwxr-xr-x 1 root root 2412 Oct 21 1996 pgmtoppm
-rwxr-xr-x 1 root root 1844 Oct 21 1996 pi1toppm
-rwxr-xr-x 1 root root 1844 Oct 21 1996 pi3topbm
-rwxr-xr-x 1 root root 16752 Oct 21 1996 picttoppm
-rwxr-xr-x 1 root root 4556 Oct 21 1996 pjtoppm
-rwxr-xr-x 1 root root 4316 Oct 21 1996 pnmarith
-rwxr-xr-x 1 root root 4684 Oct 21 1996 pnmcat
-rwxr-xr-x 1 root root 5524 Oct 21 1996 pnmconvol
-rwxr-xr-x 1 root root 2556 Oct 21 1996 pnmcrop
-rwxr-xr-x 1 root root 2268 Oct 21 1996 pnmcut
-rwxr-xr-x 1 root root 2188 Oct 21 1996 pnmdepth
-rwxr-xr-x 1 root root 1804 Oct 21 1996 pnmenlarge
-rwxr-xr-x 1 root root 1892 Oct 21 1996 pnmfile
-rwxr-xr-x 1 root root 3772 Oct 21 1996 pnmflip
-rwxr-xr-x 1 root root 2712 Oct 21 1996 pnmgamma
-rwxr-xr-x 1 root root 1604 Oct 21 1996 pnminvert
-rwxr-xr-x 1 root root 1556 Oct 21 1996 pnmnoraw
-rwxr-xr-x 1 root root 3308 Oct 21 1996 pnmpaste
-rwxr-xr-x 1 root root 5916 Oct 21 1996 pnmrotate
-rwxr-xr-x 1 root root 6508 Oct 21 1996 pnmscale
-rwxr-xr-x 1 root root 3228 Oct 21 1996 pnmshear
-rwxr-xr-x 1 root root 1804 Oct 21 1996 pnmtile
-rwxr-xr-x 1 root root 8072 Oct 21 1996 pnmtops
-rwxr-xr-x 1 root root 4224 Oct 21 1996 pnmtorast
-rwxr-xr-x 1 root root 4836 Oct 21 1996 pnmtoxwd
-rwxr-xr-x 1 root root 3404 Oct 21 1996 ppmdither
-rwxr-xr-x 1 root root 13204 Oct 21 1996 ppmforge
-rwxr-xr-x 1 root root 1836 Oct 21 1996 ppmhist
-rwxr-xr-x 1 root root 1652 Oct 21 1996 ppmmake
-rwxr-xr-x 1 root root 12620 Oct 21 1996 ppmpat
-rwxr-xr-x 1 root root 6876 Oct 21 1996 ppmquant
-rwxr-xr-x 1 root root 1972 Oct 21 1996 ppmrelief
-rwxr-xr-x 1 root root 5956 Oct 21 1996 ppmtoacad
-rwxr-xr-x 1 root root 4852 Oct 21 1996 ppmtogif
-rwxr-xr-x 1 root root 4412 Oct 21 1996 ppmtoicr
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -