Perl Graphics Programming. Creating SVG, SWF (Flash), JPEG and PNG files with Perl - Helion
ISBN: 978-14-493-5830-3
stron: 480, Format: ebook
Data wydania: 2002-12-19
Księgarnia: Helion
Cena książki: 109,65 zł (poprzednio: 127,50 zł)
Oszczędzasz: 14% (-17,85 zł)
Graphics programmers aren't the only ones who need to be proficient with graphics. Web and applications programmers know that a dull web page can be quickly transformed into one that's interesting and lively with the use of well-planned graphics. And fortunately, you don't need the skills of a fulltime graphics programmer to use graphics effectively. From access counters and log report graphs to scientific plots and on-the-fly animated GIFs, graphics scripting is within the grasp of most web programmers. Using open source software, like Perl, you have the power to dynamically generate graphics based on user input and activity, easily manipulate graphics content, and optimize graphics for compression and quality.Geared toward Perl users and webmasters, Perl Graphics Programming focuses on open-source scripting programs that manipulate graphics files for use on the Web. The book demystifies the manipulation of graphics formats for newcomers to the Web with a practical, resource-like approach. With this book you'll learn to:
- Generate dynamic web graphics with charts, tables, and buttons
- Automate graphics tasks (thumbnails and borders)
- Create dynamics web documents (PDF, Postscript)
- Produce rich Internet experiences with Flash and SVG
Osoby które kupowały "Perl Graphics Programming. Creating SVG, SWF (Flash), JPEG and PNG files with Perl", wybierały także:
- Tablice informatyczne. Flash MX 2004 ActionScript 12,58 zł, (3,90 zł -69%)
- Flash i Wallaby. Projektowanie animacji zgodnych z HTML5 24,69 zł, (7,90 zł -68%)
- Facebook Graph API. Tworzenie rozbudowanych rozwiązań we Flashu 47,00 zł, (23,50 zł -50%)
- Flash i ActionScript. Aplikacje 3D od podstaw 97,23 zł, (54,45 zł -44%)
- Adobe Flash CS5/CS5 PL Professional. Biblia 126,70 zł, (70,95 zł -44%)
Spis treści
Perl Graphics Programming. Creating SVG, SWF (Flash), JPEG and PNG files with Perl eBook -- spis treści
- Perl Graphics Programming: Creating SVG, SWF (Flash), JPEG and PNG files
- A Note Regarding Supplemental Files
- 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
- I. Raster Images and Web Graphics
- 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
- 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( )
- 3. Graphics Scripting with Image::Magick
- What Is ImageMagick?
- Installing ImageMagick
- ImageMagicks 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( )
- What Is ImageMagick?
- 4. Charts and Graphs with GD::Graph
- Lets 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
- 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
- Getting and Installing the Gimp
- 1. Creating Graphics with Perl
- II. Vector Images and Animations
- 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
- Viewing SVG Documents
- The Basic SVG Tags
- Structural Tags
- Shapes, Paths, and Images
- Text Elements
- Linking in SVG
- SVG Document Structure
- 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
- 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
- Definition Tags
- 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
- 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
- 6. SVG: The Scalable Vector Graphics Format
- III. Documents and Printing
- 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
- Structure of a PDF File
- References
- PostScript in a Nutshell
- 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
- 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
- 10. Printing with Postscript and PDF
- IV. Appendixes
- 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
- The CGI.pm Module
- 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
- The Server and CGI
- 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
- The Toolbox
- C. Image::Magick File Formats
- D. ActionScript Reference
- Operators and Control Structures
- Actions, Functions, and Properties
- Objects
- A. Serving Graphics on the Web
- Index
- About the Author
- Colophon
- Copyright