Gif4J LIGHT Java GIF Encoder - Construct and Add GIF Frames
Gif4J gif animation software logotype
Home Page for Gif4J Software java gif image processing products, solutions and services Products Page for java GIF image processing software Purchase java GIF image managing products Download Gif4J GIF image processing products Java imaging FAQs and Gif4J solutions support Contact Page Customer Area
Gif4J LIGHT java gif imaging class library logo

Construct a GIF Frame

The GifFrame java class is used as a container to aggregate and encode the gif format specific information about a single gif image frame.

GifFrame constructors can be divided into 2 types according to the desired frame position (absolute or relative). "absolute positioning" costructors contain Point parameter and "relative positioning" constructors contain layout constraint parameter.

Note: If you use "relative positioning" then the final position is calculated according to one of the predifined layout constraint before the final encoding process starts.

Absolute and Relative Internal GIF Frame Positioning

Below examples demostrate relative positioning and how you can use it (see examples/FramePositioning):


(size: 300x300, every frame size: 100x100)


(size: 200x200, every frame size: 100x100)


image tour (size: 300x240, every frame is scaled down using ImageUtils to 150x130)

Disposal Methods & Delay Time

Disposal Method - indicates the way in which the graphic is to be treated after being displayed. According to Gif89a format specification there are 4 disposal methods:
Not Specified, Do Not Dispose, Restore To Background Color and Restore To Previous.

You can set disposal method through corresponding GifFrame constructors or using the next method:

    public void setDisposalMethod(int disposalMethod

Delay Time - If not 0, this field specifies the number of hundredths (1/100) of a second to wait before continuing with the processing of the Data Stream. The clock starts ticking immediately after the graphic is rendered.

You can set delay time through corresponding GifFrame constructors or using the next method:

    public void setDelay(int delay


Adding GIF Frames to a GIF Image

To add GifFrame(s) to GifImage(s) you can use the next method (please consult GifFrame API for more information):

    public GifImage addGifFrame(GifFrame frame)

Gif4J java gif imaging lib (professional)
Gif4J PRO
Overview
 
Gif4J Java Color Quantizer
Overview
Quality Measurements & Benchmark Testing
Test Online
 
Gif4J PRO Tutorial
Loading GIF Images
Creating GIF Images
Creating GIF Frames
Transform GIF Images
Saving GIF Images
Watermarking
Morphing Filters
Text Rendering
 
Gif4J java gif imaging lib (light)
Gif4J LIGHT
Overview
 
Gif4J LIGHT Tutorial
Creating GIF Images
Creating GIF Frames
Saving GIF Images
 
Home |  Privacy Policy |  Legal Information 
© Gif4J Software 2004-2017