
Perl Graphics Programming
Description
Alles über E-Books | Antworten auf Fragen rund um E-Books, Kopierschutz und Dateiformate finden Sie in unserem Info- & Hilfebereich.
More details
Other editions
Additional editions

Content
- Intro
- Table of Contents
- Preface
- Creating Raster Images and Web Graphics
- Creating Vector Images and Animations
- Creating Documents and Printing
- Using Code Examples
- Conventions Used in This Book
- How to Contact Us
- Acknowledgments
- Part I
- Chapter 1: Creating Graphics with Perl
- Introduction to File Formats
- Color
- The RGB Color Space
- The CMYK Color Space
- Color Depth
- Color Tables
- Transparency and Alpha
- Raster File Formats
- Compression
- Interlacing
- Scanline (GIF) interlacing
- Adam7 (PNG) interlacing
- Progressive JPEGs
- PNG: An Open Standard for Web Graphics
- JPEG: The P Stands for Photographic
- GIF Animation for Fun and Profit
- Vector Graphic File Formats
- SVG for XML Images
- SWF for Flash Animation
- Document File Formats
- PostScript: A Language for Page Representation
- PDF: Toward a Truly Portable Document
- References
- Chapter 2: On-the-Fly Graphics with GD
- GD Basics
- Sample GD Applications
- Simple Drawing: Hello World
- Images from User Input: A Customized Billboard
- Image Generation Modules: The BrokenImage Module
- Reading and Writing Methods
- new( ), newPalette( ), newTrueColor( )
- newFromJpeg( ), newFromJpegData( )
- newFromGd( ), newFromGdData( )
- newFromGd2( ), newFromGd2Data( )
- newFromGd2Part( )
- newFromPng( ), newFromPngData( )
- newFromXbm( )
- gd( ), gd2( )
- jpeg( )
- png( )
- wbmp( )
- Getting and Setting General Information
- compare( )
- getBounds( )
- interlaced( )
- isTrueColor ( )
- Color Table Manipulation Methods
- colorAllocate( )
- colorDeallocate( )
- colorClosest( )
- colorClosestHWB( )
- colorExact( )
- colorResolve( )
- colorsTotal( )
- getPixel( )
- rgb( )
- setPixel( )
- transparent( )
- trueColor( )
- trueColorToPalette( )
- Brushes, Styles, and Tiles
- setBrush( )
- setStyle( )
- setTile( )
- Copying and Transforming Images
- clone( )
- copy( )
- copyMerge( )
- copyMergeGray( )
- copyResized( )
- copyResampled( )
- copyRotate90( ), copyRotate180( ), copyRotate270( )
- flipHorizontal( ), flipVertical( ), rotate180( )
- Image Drawing and Manipulation Methods
- arc( )
- fill( )
- filledPolygon( )
- filledRectangle( )
- fillToBorder( )
- line( )
- polygon( )
- rectangle( )
- Strings and Fonts
- char( )
- charUp( )
- nchars( )
- offset( )
- string( )
- stringUp( )
- stringFT( )
- width( ), height( )
- Polygon Methods
- addPt( )
- bounds( )
- deletePt( )
- getPt( )
- length( )
- map( )
- offset( )
- scale( )
- setPt( )
- toPt( )
- transform( )
- vertices( )
- Chapter 3: Graphics Scripting with Image::Magick
- What Is ImageMagick?
- Installing ImageMagick
- ImageMagick's Command-Line Tools
- Using Image::Magick
- The Basic Approach
- Error Checking
- Sample Image::Magick Applications
- Thumbnails with Image::Magick
- GIF Animation with Image::Magick
- Reading and Writing Images
- Read( )
- Write( )
- BlobToImage( ), ImageToBlob( )
- Retrieving and Setting File Information
- Comment( )
- Ping( )
- QueryFormat( )
- Signature( )
- Sizing and Transforming Images
- Chop( )
- Crop( )
- Flip( )
- Flop( )
- Magnify( )
- Minify( )
- Resize( )
- Roll( )
- Rotate( )
- Sample( )
- Scale( )
- Shear( )
- Trim( )
- Zoom( )
- Copying and Composing Images
- Append( )
- Clone( )
- Composite( )
- Montage( )
- Color and Transparency
- Channel( )
- Gamma( )
- Map( )
- MatteFloodfill( )
- Profile( )
- Quantize( )
- QueryColor( )
- Segment( )
- Transparent( )
- Annotation and Drawing
- Annotate( )
- ColorFloodfill( )
- Draw( )
- Label( )
- QueryFont( )
- QueryFontMetrics( )
- Filters and Effects
- AddNoise( )
- Average( )
- Blur( )
- Border( )
- Charcoal( )
- Colorize( )
- Contrast( )
- Convolve( )
- CycleColormap( )
- Despeckle( )
- Edge( )
- Emboss( )
- Enhance( )
- Equalize( )
- Frame( )
- Implode( )
- MedianFilter( )
- Modulate( )
- Mogrify( )
- MogrifyRegion( )
- Negate( )
- Normalize( )
- OilPaint( )
- Opaque( )
- Raise( )
- ReduceNoise( )
- Shade( )
- Sharpen( )
- Solarize( )
- Spread( )
- Swirl( )
- Texture( )
- Threshold( )
- Wave( )
- Chapter 4: Charts and Graphs with GD::Graph
- Let's Make Some Graphs!
- A Sample GD::Graph Application
- GD::Graph Methods
- gd( )
- new( )
- plot( )
- can_do_ttf( )
- get( )
- get_hotspot( )
- set( )
- set_label_font( ), set_value_font( )
- set_legend( )
- set_legend_font( )
- set_text_clr( )
- set_title_font( )
- set_x_label_font( ), set_y_label_font( ), set_x_axis_font( ), set_y_axis_font( )
- Attributes of GD::Graph Objects
- Attributes of All Graphs
- Attributes of Graphs with Axes
- Attributes of Bar Graphs
- Attributes of Graphs with Lines
- Attributes of Graphs with Points
- Attributes of Mixed Graphs
- Attributes of Pie Graphs
- Logos and Legends
- Colors and Fonts in GD::Graph
- colour_list
- hex2rgb
- rgb2hex
- read_rgb
- sorted_colour_list
- Chapter 5: Scripting the Gimp with Perl
- Getting and Installing the Gimp
- Installing the Gimp
- Installing the Perl Scripting Extension
- Writing Gimp Plug-ins in Perl
- The Gimp and Gimp::Fu Modules
- Types of Plug-ins
- Your First Gimp Script
- Object-Oriented Versus Procedural Scripting
- Adding New Features to the Gimp
- Handling Selections and Layers
- Manipulating Raw Data with Pixel Regions
- The PixelRgn object
- PDL objects
- A filter plug-in using pixel regions
- Alternative User Interfaces
- Standalone Scripts
- Part II
- Chapter 6: SVG: The Scalable Vector Graphics Format
- SVG Document Structure
- Viewing SVG Documents
- Standalone SVG documents
- Embedding SVG as an image reference
- Embedding SVG as an inline image
- Serving Compressed SVGs
- Rendering an SVG Document Tree
- Views and Coordinate Systems
- The Basic SVG Tags
- Structural Tags
- Shapes, Paths, and Images
- Text Elements
- Linking in SVG
- Chapter 7: Creating SVG with Perl
- A Slide-Show Presentation
- SVG Animation
- Creating a Bouncing Ball
- SVG Scripting with JavaScript
- Using Unicode Text in SVG Images
- Transformation with XSLT and Perl
- Chapter 8: SWF: The Flash File Format
- The History of Flash and SWF
- The Format and Function of SWF Files
- Definition Tags
- Shapes
- Text and fonts
- Bitmaps
- Buttons
- Sounds
- Morph shapes
- Sprites
- Control Tags
- The Dictionary and Display List
- SWF Data Types
- Integer fields
- Bit fields
- The coordinate system
- Anatomy of a Tag
- The Header Record
- Character ID
- Bounding Box
- The Fill Style Array
- The Line Style Array
- NumFillBits and NumLineBits
- The ShapeRecord List
- Parsing an SWF File with Perl
- Chapter 9: Using Ming
- Installation
- Overview of the Perl Interface
- The Astral Trespassers Game
- The SWF Module
- setScale( )
- setVersion( )
- The SWF::Movie Module
- add( )
- addAction( )
- labelFrame( )
- new( )
- nextFrame( )
- output( )
- remove( )
- save( )
- setBackground( )
- setDimension( )
- setFrames( )
- setRate( )
- setSoundStream( )
- The SWF::Sprite (or SWF::MovieClip) Module
- The SWF::DisplayItem Module
- move( )
- moveTo( )
- remove( )
- rotate( )
- rotateTo( )
- scale( )
- scaleTo( )
- setColorAdd( )
- setColorMult( )
- setDepth( )
- setName( )
- setRatio( )
- skewX( ), skewY( )
- skewXTo( ), skewYTo( )
- The SWF::Shape Module
- addFill( )
- drawCurveTo( )
- drawCurve( )
- drawCircle( )
- drawFontGlyph( )
- drawLine( )
- drawLineTo( )
- movePenTo( )
- movePen( )
- new( )
- setLeftFill( ), setRightFill( )
- setLineStyle( )
- The SWF::Button Module
- addShape( )
- new( )
- setAction( )
- setHit( )
- setDown( )
- setOver( )
- setUp( )
- The SWF::Bitmap Module
- getHeight( )
- getWidth( )
- new( )
- The SWF::Text Module
- addString( )
- getStringWidth( )
- moveTo( )
- new( )
- setColor( )
- setFont( )
- setHeight( )
- setSpacing( )
- The SWF::TextField Module
- addString( )
- align( )
- new( )
- setBounds( )
- setColor( )
- setFont( )
- setHeight( )
- setIndentation( )
- setLineSpacing( )
- setMargin( ), setLeftMargin( ), setRightMargin( )
- setName( )
- The SWF::Font Module
- new( )
- The SWF::Fill Module
- moveTo( )
- rotateTo( )
- scaleTo( )
- skewXTo( ), skewYTo( )
- The SWF::Gradient Module
- addEntry( )
- new( )
- The SWF::Morph Module
- getShape1( )
- getShape2( )
- new( )
- The SWF::Sound Module
- new( )
- The SWF::Action Module
- new( )
- SWF Recipes
- Drawing a Circle
- Creating a Preloader with Ming
- Assembling Sprite-Based Documents with XML
- Communicating Between an SWF Client and a Perl Backend
- Part III
- Chapter 10: Printing with Postscript and PDF
- PostScript in a Nutshell
- The Page
- Some PostScript Functions
- PostScript Document Structuring Conventions
- The prolog
- The body
- Portable Document Format (PDF)
- Structure of a PDF File
- The header
- The body
- The cross-reference table
- The trailer
- PDF Operators for Drawing Graphics
- Constructing paths
- Setting the graphics state
- Filling and stroking the path
- PDF Operators for Drawing Text
- Drawing with the Text::PDF Module
- References
- Chapter 11: Using the PostScript Modules
- Creating PostScript from a Web Interface
- The PostScript::TextBlock Module
- new( )
- addText( )
- numElements( )
- Write( )
- The PostScript::Document Module
- new( )
- addText( )
- addHeader( )
- addFooter( )
- Write( )
- The PostScript::Elements Module
- new( )
- addArc( )
- addBox( )
- addEPS( )
- addLine( )
- Write( )
- Other PostScript Modules
- Chapter 12: Creating PDF Documents with Perl
- Introduction to PDF::API2
- Creating Address Labels
- Adding to Existing PDF Files
- PDF::API2 Reference
- clonepage( )
- corefont( )
- end( )
- image( )
- imagemask( )
- importpage( )
- info( )
- mediabox( )
- new( )
- open( )
- openpage( )
- outlines( )
- page( )
- pages( )
- pdfimage( )
- psfont( )
- saveas( )
- stringify( )
- ttfont( )
- update( )
- PDF::API2::Page
- artbox( )
- bleedbox( )
- cropbox( )
- gfx( )
- hybrid( )
- mediabox( )
- text( )
- trimbox( )
- PDF::API2::Content
- compress( )
- restore( )
- save( )
- fillcolor( )
- flatness( )
- linecap( )
- linedash( )
- linejoin( )
- linewidth( )
- rotate( )
- scale( )
- skew( )
- strokecolor( )
- transform( )
- translate( )
- PDF::API2::Gfx
- arc( )
- circle( )
- clip( )
- close( )
- curve( )
- ellipse( )
- endpath( )
- fill( )
- fillstroke( )
- image( )
- line( )
- move( )
- poly( )
- rect( )
- rectxy( )
- stroke( )
- PDF::API2::Text
- charspace( )
- cr( )
- font( )
- hspace( )
- lead( )
- nl( )
- text( )
- text_center( )
- textln( )
- text_right( )
- text_utf8( )
- wordspace( )
- PDF::API2::Outline
- dest( )
- outline( )
- title( )
- References
- Part IV
- Appendix A: Serving Graphics on the Web
- The Server and CGI
- The CGI.pm Module
- Parsing CGI input with CGI.pm
- Generating HTTP headers with CGI.pm
- Increasing Server Performance
- Limit the number of simultaneous requests
- Install mod_perl
- Image farming
- Web Graphics and the Browser
- Presenting Images in HTML
- The SRC Attribute
- The WIDTH and HEIGHT Attributes
- Layout and Spacing Attributes
- The ALT Attribute
- Background Images
- The OBJECT Tag
- References
- Appendix B: Gimp Reference
- The Gimp::Fu register( ) Method
- The Gimp Interface
- The Toolbox
- The selection tools
- The move tool
- The magnifying glass tool
- The crop tool
- The transform tool
- The flip tool
- The text tool
- The color picker
- The bucket fill tool
- The blend tool
- The pencil tool
- The paintbrush tool
- The eraser tool
- The airbrush tool
- The clone tool
- The convolver tool
- The ink tool
- The dodge and burn tool
- The smudge tool
- The measure tool
- The Toolbox Menu Hierarchy
- The file menu
- The Xtns menu
- The Image Menu Hierarchy
- The File menu
- The Edit menu
- The Select menu
- The View menu
- The Image menu
- The Layers menu
- The Tools menu
- The Dialogs menu
- The Filters menu
- The Guides menu
- The Script-Fu menu
- Appendix C: Image::Magick File Formats
- Appendix D: ActionScript Reference
- Operators and Control Structures
- Actions, Functions, and Properties
- Objects
- Index
System requirements
File format: PDF
Copy-Protection: Adobe-DRM (Digital Rights Management)
System requirements:
- Computer (Windows; MacOS X; Linux): Install the free reader Adobe Digital Editions prior to download (see eBook Help).
- Tablet/smartphone (Android; iOS): Install the free app Adobe Digital Editions or the app PocketBook before downloading (see eBook Help).
- E-reader: Bookeen, Kobo, Pocketbook, Sony, Tolino and many more (only limited: Kindle).
The file format PDF always displays a book page identically on any hardware. This makes PDF suitable for complex layouts such as those used in textbooks and reference books (images, tables, columns, footnotes). Unfortunately, on the small screens of e-readers or smartphones, PDFs are rather annoying, requiring too much scrolling.
This eBook uses Adobe-DRM, a „hard” copy protection. If the necessary requirements are not met, unfortunately you will not be able to open the eBook. You will therefore need to prepare your reading hardware before downloading.
Please note: We strongly recommend that you authorise using your personal Adobe ID after installation of any reading software.
For more information, see our eBook Help page.