GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  PRIMA::IMAGE::ANIMATEGIF (3)

.ds Aq ’

NAME

Prima::Image::AnimateGIF - animate gif files

CONTENTS

DESCRIPTION

The module provides high-level access to GIF animation sequences.

SYNOPSIS



        use Prima qw(Application Image::AnimateGIF);
        my $x = Prima::Image::AnimateGIF->load($ARGV[0]);
        die $@ unless $x;
        my ( $X, $Y) = ( 0, 100);
        my $background = $::application-> get_image( $X, $Y, $x-> size);
        $::application-> begin_paint;

        while ( my $info = $x-> next) {
                my $frame = $background-> dup;
                $frame-> begin_paint;
                $x-> draw( $frame, 0, 0);
                $::application-> put_image( $X, $Y, $frame);

                $::application-> sync;
                select(undef, undef, undef, $info-> {delay});
        }

        $::application-> put_image( $X, $Y, $g);



new CW$CLASS, CW%OPTIONS

Creates an empty animation container. If $OPTIONS{images} is given, it is expected to be an array of images, best if loaded from gif files with loadExtras and iconUnmask parameters set ( see Prima::image-load for details).

load CW$SOURCE, CW%OPTIONS

Loads GIF animation sequence from file or stream $SOURCE. Options are the same as understood by Prima::Image::load, and are passed down to it.

add CW$IMAGE

Appends an image frame to the container.

    bgColor

Return the background color specified by the GIF sequence as the preferred background color to use when there is no specific background to superimpose the animation to.

    current

Return index of the current frame

draw CW$CANVAS, CW$X, CW$Y

Draws the current composite frame on $CANVAS at the given coordinates.

    height

Returns height of the composite frame.

    icon

Creates and returns an icon object off the current composite frame.

    image

Creates and returns an image object off the current composite frame. The transparent pixels on the image are replaced with the preferred background color.

    is_stopped

Returns true if the animation sequence was stopped, false otherwise. If the sequence was stopped, the only way to restart it is to call reset.

    length

Returns total animation length (without repeats) in seconds.

    loopCount [ INTEGER ]

Sets and returns number of loops left, undef for indefinite.

    masks

Return the AND and XOR masks, that can be used to display the current composite frame.

    next

Advances one animation frame. The step triggers changes to the internally kept AND and XOR masks that create effect of transparency, if needed. The method return a hash, where the following field are initialized:
left, bottom, right, top Coordinates of the changed area since the last frame was updated.
delay Time ins seconds how long the frame is expected to be displayed.

    reset

Resets the animation sequence. This call is necessary either when image sequence was altered, or when sequence display restart is needed.

    size

Returns width and height of the composite frame.

    total

Return number fo frames

    width

Returns width of the composite frame.

SEE ALSO

Prima::image-load, <http://www.the-labs.com/GIFMerge/>

AUTHOR

Dmitry Karasik, <dmitry@karasik.eu.org>.
Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 PRIMA::IMAGE::ANIMATEGIF (3) 2014-06-10

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.