added GIF library

Esse commit está contido em:
Conor Russomanno
2016-12-19 14:10:58 -05:00
commit 7ae4b94b12
32 arquivos alterados com 7023 adições e 0 exclusões
+1
Ver Arquivo
@@ -285,6 +285,7 @@ class ControlPanel {
cp5 = new ControlP5(mainClass);
cp5Popup = new ControlP5(mainClass);
cp5.setAutoDraw(false);
// cp5.set
cp5Popup.setAutoDraw(false);
//boxes active when eegDataSource = Normal (OpenBCI)
+4
Ver Arquivo
@@ -207,7 +207,9 @@ PFont h5; //small Montserrat
PFont p1; //large Open Sans
PFont p2; //large/medium Open Sans
PFont p3; //medium Open Sans
PFont p15;
PFont p4; //medium/small Open Sans
PFont p13;
PFont p5; //small Open Sans
PFont p6; //small Open Sans
@@ -284,7 +286,9 @@ void setup() {
p1 = createFont("fonts/OpenSans-Regular.ttf", 20);
p2 = createFont("fonts/OpenSans-Regular.ttf", 18);
p3 = createFont("fonts/OpenSans-Regular.ttf", 16);
p15 = createFont("fonts/OpenSans-Regular.ttf", 15);
p4 = createFont("fonts/OpenSans-Regular.ttf", 14);
p13 = createFont("fonts/OpenSans-Regular.ttf", 13);
p5 = createFont("fonts/OpenSans-Regular.ttf", 12);
p6 = createFont("fonts/OpenSans-Regular.ttf", 10);
+1
Ver Arquivo
@@ -0,0 +1 @@
.DS_Store
+200
Ver Arquivo
@@ -0,0 +1,200 @@
# gifAnimation processing library
GifAnimation is a [Processing][1] library to play and export GIF animations.
Original code by [Patrick Meister][5] .
The GIFEncoder & GIFDecoder classes were written by [Kevin Weiner][2].
Please see the separate copyright notice in the headers of the GifDecoder & GifEncoder classes.
Processing 3.x port by [Jerome Saint-Clair][3]
## DOWNLOAD
[GifAnimation.zip][4] (compatible with Processing 3.x)
## INSTALLATION:
### Processing 3.x
Download and unzip the gifAnimation.zip and copy the gifAnimation-folder into your processing libraries folder.
## USAGE:
Besides this reference, there are basic examples included in the download. To use gifAnimation library, you need to import it into your sketch by using the menu or typing
```java
import gifAnimation.*;
```
### DISPLAYING A GIF ANIMATION:
The class to access/display GIF animations is called `Gif`. It has two possibilities to access the frame pixel data:
Extract all frames of an animated Gif into a PImage[] array using the static method "getPImages()". you need to pass a reference to the PApplet and a filename to it. The file should be in the sketch data folder. This method is useful if you just want to mess with the frames yourself and don't need the playback possibilities. The method is static, so you have no separate thread going.
```java
PImage[] allFrames = Gif.getPImages(this, "lavalamp.gif");
```
The second way to access the animation is to play it like a video. This will play the animation with the frame delays specified in the GIF file. Gif extends PImage, so any instance of Gif fits wherever PImage can be used.
#### Create a new Gif object
```java
Gif myAnimation = new Gif(PApplet parent, String filename);
```
In a sketch this would look like this:
```java
Gif myAnimation;
void setup() {
size(400,400);
myAnimation = new Gif(this, "lavalamp.gif");
myAnimation.play();
}
void draw() {
image(myAnimation, 10, 10);
}
```
### EXPORTING A GIF ANIMATION
The class to export GIF animations is called `GifMaker`. To start recording
into a GIF file, create a GifMaker object in one of the following ways:
```java
GifMaker gifExport = new GifMaker(PApplet parent, String filename);
```
```java
GifMaker gifExport = new GifMaker(PApplet parent, String filename, int quality);
```
```java
GifMaker gifExport = new GifMaker(PApplet parent, String filename, int quality, int transparentColor);
```
In a sketch this would look like this:
```java
void setup() {
size(200,200);
frameRate(12);
gifExport = new GifMaker(this, "export.gif");
gifExport.setRepeat(0); // make it an "endless" animation
gifExport.setTransparent(0,0,0); // black is transparent
}
void draw() {
background(0);
fill(255);
ellipse(mouseX, mouseY, 10, 10);
gifExport.setDelay(1);
gifExport.addFrame();
}
void mousePressed() {
gifExport.finish(); // write file
}
```
##DOCUMENTATION
###The 'Gif' Class
####void play()
plays the animation without loop
####void pause()
pauses the animation
####void stop()
stops and rewinds the animation
####void loop()
starts the animation. it will play in a loop and ignore the
GIF repeat setting.
####void noLoop()
disables looping
####void ignoreRepeat()
GIF-files can have a repeat-count setting. It states the amount of loops this animation should perform. if you call `ignoreRepeat()` on a Gif object, it will ingore this setting when playing. If you start animations using `loop()`, repeat settings will always be ignored.
#### void jump(int where)
jumps to a specific frame in the animation if that frame exists
#### boolean isPlaying()
whether the Animation is currently playing
#### boolean isLooping()
whether the Animation has its loop-flag set
#### boolean isIgnoringRepeat()
whether this Gif has its ignoreRepeat-flag set or not.
See also `ignoreRepeat()`
#### int currentFrame()
returns the number of the frame that is currently displayed
#### PImage[] getPImages()
returns an array of PImages containing the animation frames. note that this method is called in an instance of Gif, while `Gif.getPImages(PApplet, String)` is a static method
#### int getRepeat()
returns the number of repeats that is specified in the GIF-file
### The GifMaker Class
#### void setTransparent(int color)
#### void setTransparent(int red, int green, int blue)
#### void setTransparent(float red, float green, float blue)
Sets the transparent color of the GIF file. Unlike other image formats
that support alpha (e.g. PNG), GIF does not support semi-transparent pixels.
The way to achieve transparency is to set a color that will be transparent
when rendering the GIF. So, if you set the transparent color to black, the
black pixels in your gif file will be transparent.
#### void setQuality(int qualtiy)
Sets the quality of the color quantization process. GIF only supports 256 indexed colors per frame. So, the colors that come in your images need to be reduced to a set of 256 colors. The quality of this process can be set using this method (or by instantiating the GifMaker object with the respective constructor). Default is 10 and seems to produce good results. Higher qualities will cause the quantization process to be more expensive in terms of cpu-usage.
#### void setSize(int width, int height)
Sets the size of the new GIF file. If this method is not invoked, the image dimensions of the first added frame will be the size of the GIF.
#### void setRepeat(int count)
Sets the repeat setting in the GIF file. GIF renderers like web browsers should respect this setting and loop the animation that many times before stopping. Default is 1. 0 means endless loop.
#### void addFrame()
Adds the current sketch window content as a new gif frame.
#### void addFrame(PImage image)
Pass a PImage to add it as a new gif frame
#### void addFrame(int[] pixelArray, int width, int height)
Pass a int pixel array and the width and height to add it as a new gif frame.
#### void setDelay(int ms)
Sets the delay (the "framerate") for the most recently added frame. This is measured in Milliseconds. This can be different for every frame. Note, this effects the playback speed of the resulting GIF-file only. So, the speed / framerate with which you wrote the frames has no effect on play-
back speed.
#### void setDispose(int mode)
Sets the disposal mode for the current frame. Disposal modes are a special concept used in the GIF file format. It basically determines whether a frame will be overriden by the next frame, or if the next frame should be added, layed over the last frame.
For convenience there are constants for the different disposal modes:
| Dispose mode | |
|--------|--------|
| GifMaker.DISPOSE_NOTHING | Nothing special |
| GifMaker.DISPOSE_KEEP | retain the current image |
| GifMaker.DISPOSE\_RESTORE\_BACKGROUND|restore the background color|
| GifMaker.DISPOSE_REMOVE |restore the background color|
#### boolean finish()
Finishes GIF recording and saves the GIF file to the given file name in
the sketch folder. Returns true if saving the file was successful, false if not.
[1]: http://www.processing.org
[2]: http://www.fmsware.com/stuff/gif.html
[3]: http://www.saint-clair.net
[4]: https://github.com/01010101/GifAnimation/archive/master.zip
[5]: https://github.com/extrapixel
Arquivo binário não exibido.

Depois

Largura:  |  Altura:  |  Tamanho: 26 KiB

+55
Ver Arquivo
@@ -0,0 +1,55 @@
/*
* Demonstrates the use of the GifAnimation library.
* the left animation is looping, the one in the middle
* plays once on mouse click and the one in the right
* is a PImage array.
* the first two pause if you hit the spacebar.
*/
import gifAnimation.*;
PImage[] animation;
Gif loopingGif;
Gif nonLoopingGif;
boolean pause = false;
public void setup() {
size(400, 200);
frameRate(100);
println("gifAnimation " + Gif.version());
// create the GifAnimation object for playback
loopingGif = new Gif(this, "lavalamp.gif");
loopingGif.loop();
nonLoopingGif = new Gif(this, "lavalamp.gif");
nonLoopingGif.play();
nonLoopingGif.ignoreRepeat();
// create the PImage array for the interactive display
animation = Gif.getPImages(this, "lavalamp.gif");
}
void draw() {
background(255 / (float)height * mouseY);
image(loopingGif, 10, height / 2 - loopingGif.height / 2);
image(nonLoopingGif, width/2 - nonLoopingGif.width/2, height / 2 - nonLoopingGif.height / 2);
image(animation[(int) (animation.length / (float) (width) * mouseX)], width - 10 - animation[0].width, height / 2 - animation[0].height / 2);
}
void mousePressed() {
nonLoopingGif.play();
}
void keyPressed() {
if (key == ' ') {
if (pause) {
nonLoopingGif.play();
loopingGif.play();
pause = false;
}
else {
nonLoopingGif.pause();
loopingGif.pause();
pause = true;
}
}
}
Arquivo binário não exibido.

Depois

Largura:  |  Altura:  |  Tamanho: 23 KiB

+41
Ver Arquivo
@@ -0,0 +1,41 @@
/*
* Demonstrates the use of the GifAnimation library.
* Exports a GIF-File to the sketch folder if space
* bar is pressed. Wow, feels like 90's! ;)
*/
import gifAnimation.*;
import processing.opengl.*;
GifMaker gifExport;
PImage logo;
float rotation = 0.0;
public void setup() {
size(200, 200, OPENGL);
frameRate(12);
logo = loadImage("processing.png");
println("gifAnimation " + Gif.version());
gifExport = new GifMaker(this, "export.gif");
gifExport.setRepeat(0); // make it an "endless" animation
gifExport.setTransparent(0,0,0); // make black the transparent color. every black pixel in the animation will be transparent
// GIF doesn't know have alpha values like processing. a pixel can only be totally transparent or totally opaque.
// set the processing background and the transparent gif color to the same value as the gifs destination background color
// (e.g. the website bg-color). Like this you can have the antialiasing from processing in the gif.
}
void draw() {
background(0);
translate(width/2, height/2);
rotation+=.1;
rotateY(rotation);
image(logo, -logo.width/2,-logo.height/2);
gifExport.setDelay(1);
gifExport.addFrame();
}
void keyPressed() {
gifExport.finish();
println("gif saved");
}
+57
Ver Arquivo
@@ -0,0 +1,57 @@
# More on this file here: https://github.com/processing/processing/wiki/Library-Basics
# UTF-8 supported.
# The name of your Library as you want it formatted.
name = GifAnimation
# List of authors. Links can be provided using the syntax [author name](url).
authors = [Patrick Meister, Jerome Saint-Clair](http://www.extrapixel.ch)
# A web page for your Library, NOT a direct link to where to download it.
url = http://github.com/01010101/GifAnimation
# The category (or categories) of your Library, must be from the following list:
# "3D" "Animation" "Compilations" "Data"
# "Fabrication" "Geometry" "GUI" "Hardware"
# "I/O" "Language" "Math" "Simulation"
# "Sound" "Utilities" "Typography" "Video & Vision"
#
# If a value other than those listed is used, your Library will listed as
# "Other". Many categories must be comma-separated.
categories = Animation
# A short sentence (or fragment) to summarize the Library's function. This will
# be shown from inside the PDE when the Library is being installed. Avoid
# repeating the name of your Library here. Also, avoid saying anything redundant
# like mentioning that it's a Library. This should start with a capitalized
# letter, and end with a period.
sentence = A library to play and export GIF animations.
# Additional information suitable for the Processing website. The value of
# 'sentence' always will be prepended, so you should start by writing the
# second sentence here. If your Library only works on certain operating systems,
# mention it here.
paragraph = Processing v3.x port by [Jerome Saint-Clair (01010101)](http://saint-clair.net/). GIFEncoder & GIFDecoder classes by Kevin Weiner.
# Links in the 'sentence' and 'paragraph' attributes can be inserted using the
# same syntax as for authors.
# That is, [here is a link to Processing](http://processing.org/)
# A version number that increments once with each release. This is used to
# compare different versions of the same Library, and check if an update is
# available. You should think of it as a counter, counting the total number of
# releases you've had.
version = 3 # This must be parsable as an int
# The version as the user will see it. If blank, the version attribute will be
# used here. This should be a single word, with no spaces.
prettyVersion = 3.0.0 # This is treated as a String
# The min and max revision of Processing compatible with your Library.
# Note that these fields use the revision and not the version of Processing,
# parsable as an int. For example, the revision number for 2.2.1 is 227.
# You can find the revision numbers in the change log: https://raw.githubusercontent.com/processing/processing/master/build/shared/revisions.txt
# Only use maxRevision (or minRevision), when your Library is known to
# break in a later (or earlier) release. Otherwise, use the default value 0.
minRevision = 3.0
maxRevision = 0
Arquivo binário não exibido.
+22
Ver Arquivo
@@ -0,0 +1,22 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_45) on Tue Sep 29 23:37:43 CEST 2015 -->
<title>All Classes (Javadocs: GifAnimation)</title>
<meta name="date" content="2015-09-29">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
<script type="text/javascript" src="script.js"></script>
</head>
<body>
<h1 class="bar">All&nbsp;Classes</h1>
<div class="indexContainer">
<ul>
<li><a href="gifAnimation/Gif.html" title="class in gifAnimation" target="classFrame">Gif</a></li>
<li><a href="gifAnimation/GifDecoder.html" title="class in gifAnimation" target="classFrame">GifDecoder</a></li>
<li><a href="gifAnimation/GifEncoder.html" title="class in gifAnimation" target="classFrame">GifEncoder</a></li>
<li><a href="gifAnimation/GifMaker.html" title="class in gifAnimation" target="classFrame">GifMaker</a></li>
</ul>
</div>
</body>
</html>
+22
Ver Arquivo
@@ -0,0 +1,22 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_45) on Tue Sep 29 23:37:43 CEST 2015 -->
<title>All Classes (Javadocs: GifAnimation)</title>
<meta name="date" content="2015-09-29">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
<script type="text/javascript" src="script.js"></script>
</head>
<body>
<h1 class="bar">All&nbsp;Classes</h1>
<div class="indexContainer">
<ul>
<li><a href="gifAnimation/Gif.html" title="class in gifAnimation">Gif</a></li>
<li><a href="gifAnimation/GifDecoder.html" title="class in gifAnimation">GifDecoder</a></li>
<li><a href="gifAnimation/GifEncoder.html" title="class in gifAnimation">GifEncoder</a></li>
<li><a href="gifAnimation/GifMaker.html" title="class in gifAnimation">GifMaker</a></li>
</ul>
</div>
</body>
</html>
+204
Ver Arquivo
@@ -0,0 +1,204 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_45) on Tue Sep 29 23:37:43 CEST 2015 -->
<title>Constant Field Values (Javadocs: GifAnimation)</title>
<meta name="date" content="2015-09-29">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
<script type="text/javascript" src="script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Constant Field Values (Javadocs: GifAnimation)";
}
}
catch(err) {
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="gifAnimation/package-summary.html">Package</a></li>
<li>Class</li>
<li><a href="overview-tree.html">Tree</a></li>
<li><a href="deprecated-list.html">Deprecated</a></li>
<li><a href="index-all.html">Index</a></li>
<li><a href="help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev</li>
<li>Next</li>
</ul>
<ul class="navList">
<li><a href="index.html?constant-values.html" target="_top">Frames</a></li>
<li><a href="constant-values.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<div class="header">
<h1 title="Constant Field Values" class="title">Constant Field Values</h1>
<h2 title="Contents">Contents</h2>
<ul>
<li><a href="#gifAnimation">gifAnimation.*</a></li>
</ul>
</div>
<div class="constantValuesContainer"><a name="gifAnimation">
<!-- -->
</a>
<h2 title="gifAnimation">gifAnimation.*</h2>
<ul class="blockList">
<li class="blockList">
<table class="constantsSummary" border="0" cellpadding="3" cellspacing="0" summary="Constant Field Values table, listing constant fields, and values">
<caption><span>gifAnimation.<a href="gifAnimation/GifDecoder.html" title="class in gifAnimation">GifDecoder</a></span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th scope="col">Constant Field</th>
<th class="colLast" scope="col">Value</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colFirst"><a name="gifAnimation.GifDecoder.STATUS_FORMAT_ERROR">
<!-- -->
</a><code>public&nbsp;static&nbsp;final&nbsp;int</code></td>
<td><code><a href="gifAnimation/GifDecoder.html#STATUS_FORMAT_ERROR">STATUS_FORMAT_ERROR</a></code></td>
<td class="colLast"><code>1</code></td>
</tr>
<tr class="rowColor">
<td class="colFirst"><a name="gifAnimation.GifDecoder.STATUS_OK">
<!-- -->
</a><code>public&nbsp;static&nbsp;final&nbsp;int</code></td>
<td><code><a href="gifAnimation/GifDecoder.html#STATUS_OK">STATUS_OK</a></code></td>
<td class="colLast"><code>0</code></td>
</tr>
<tr class="altColor">
<td class="colFirst"><a name="gifAnimation.GifDecoder.STATUS_OPEN_ERROR">
<!-- -->
</a><code>public&nbsp;static&nbsp;final&nbsp;int</code></td>
<td><code><a href="gifAnimation/GifDecoder.html#STATUS_OPEN_ERROR">STATUS_OPEN_ERROR</a></code></td>
<td class="colLast"><code>2</code></td>
</tr>
</tbody>
</table>
</li>
<li class="blockList">
<table class="constantsSummary" border="0" cellpadding="3" cellspacing="0" summary="Constant Field Values table, listing constant fields, and values">
<caption><span>gifAnimation.<a href="gifAnimation/GifMaker.html" title="class in gifAnimation">GifMaker</a></span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th scope="col">Constant Field</th>
<th class="colLast" scope="col">Value</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colFirst"><a name="gifAnimation.GifMaker.DISPOSE_KEEP">
<!-- -->
</a><code>public&nbsp;static&nbsp;final&nbsp;int</code></td>
<td><code><a href="gifAnimation/GifMaker.html#DISPOSE_KEEP">DISPOSE_KEEP</a></code></td>
<td class="colLast"><code>1</code></td>
</tr>
<tr class="rowColor">
<td class="colFirst"><a name="gifAnimation.GifMaker.DISPOSE_NOTHING">
<!-- -->
</a><code>public&nbsp;static&nbsp;final&nbsp;int</code></td>
<td><code><a href="gifAnimation/GifMaker.html#DISPOSE_NOTHING">DISPOSE_NOTHING</a></code></td>
<td class="colLast"><code>0</code></td>
</tr>
<tr class="altColor">
<td class="colFirst"><a name="gifAnimation.GifMaker.DISPOSE_REMOVE">
<!-- -->
</a><code>public&nbsp;static&nbsp;final&nbsp;int</code></td>
<td><code><a href="gifAnimation/GifMaker.html#DISPOSE_REMOVE">DISPOSE_REMOVE</a></code></td>
<td class="colLast"><code>3</code></td>
</tr>
<tr class="rowColor">
<td class="colFirst"><a name="gifAnimation.GifMaker.DISPOSE_RESTORE_BACKGROUND">
<!-- -->
</a><code>public&nbsp;static&nbsp;final&nbsp;int</code></td>
<td><code><a href="gifAnimation/GifMaker.html#DISPOSE_RESTORE_BACKGROUND">DISPOSE_RESTORE_BACKGROUND</a></code></td>
<td class="colLast"><code>2</code></td>
</tr>
</tbody>
</table>
</li>
</ul>
</div>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="gifAnimation/package-summary.html">Package</a></li>
<li>Class</li>
<li><a href="overview-tree.html">Tree</a></li>
<li><a href="deprecated-list.html">Deprecated</a></li>
<li><a href="index-all.html">Index</a></li>
<li><a href="help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev</li>
<li>Next</li>
</ul>
<ul class="navList">
<li><a href="index.html?constant-values.html" target="_top">Frames</a></li>
<li><a href="constant-values.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Processing Library GifAnimation by Patrick Meister, Jerome Saint-Clair. ${library.copyright}</small></p>
</body>
</html>
+121
Ver Arquivo
@@ -0,0 +1,121 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_45) on Tue Sep 29 23:37:43 CEST 2015 -->
<title>Deprecated List (Javadocs: GifAnimation)</title>
<meta name="date" content="2015-09-29">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
<script type="text/javascript" src="script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Deprecated List (Javadocs: GifAnimation)";
}
}
catch(err) {
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="gifAnimation/package-summary.html">Package</a></li>
<li>Class</li>
<li><a href="overview-tree.html">Tree</a></li>
<li class="navBarCell1Rev">Deprecated</li>
<li><a href="index-all.html">Index</a></li>
<li><a href="help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev</li>
<li>Next</li>
</ul>
<ul class="navList">
<li><a href="index.html?deprecated-list.html" target="_top">Frames</a></li>
<li><a href="deprecated-list.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<div class="header">
<h1 title="Deprecated API" class="title">Deprecated API</h1>
<h2 title="Contents">Contents</h2>
</div>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="gifAnimation/package-summary.html">Package</a></li>
<li>Class</li>
<li><a href="overview-tree.html">Tree</a></li>
<li class="navBarCell1Rev">Deprecated</li>
<li><a href="index-all.html">Index</a></li>
<li><a href="help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev</li>
<li>Next</li>
</ul>
<ul class="navList">
<li><a href="index.html?deprecated-list.html" target="_top">Frames</a></li>
<li><a href="deprecated-list.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Processing Library GifAnimation by Patrick Meister, Jerome Saint-Clair. ${library.copyright}</small></p>
</body>
</html>
Diff do arquivo suprimido porque uma ou mais linhas são muito longas
+553
Ver Arquivo
@@ -0,0 +1,553 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_45) on Tue Sep 29 23:37:43 CEST 2015 -->
<title>GifDecoder (Javadocs: GifAnimation)</title>
<meta name="date" content="2015-09-29">
<link rel="stylesheet" type="text/css" href="../stylesheet.css" title="Style">
<script type="text/javascript" src="../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="GifDecoder (Javadocs: GifAnimation)";
}
}
catch(err) {
}
//-->
var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../gifAnimation/package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../deprecated-list.html">Deprecated</a></li>
<li><a href="../index-all.html">Index</a></li>
<li><a href="../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../gifAnimation/Gif.html" title="class in gifAnimation"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../gifAnimation/GifEncoder.html" title="class in gifAnimation"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../index.html?gifAnimation/GifDecoder.html" target="_top">Frames</a></li>
<li><a href="GifDecoder.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">gifAnimation</div>
<h2 title="Class GifDecoder" class="title">Class GifDecoder</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li>gifAnimation.GifDecoder</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre>public class <span class="typeNameLabel">GifDecoder</span>
extends <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></pre>
<div class="block">Class GifDecoder - Decodes a GIF file into one or more frames. <br>
<pre>
Example:
GifDecoder d = new GifDecoder();
d.read(&quot;sample.gif&quot;);
int n = d.getFrameCount();
for (int i = 0; i &lt; n; i++) {
BufferedImage frame = d.getFrame(i); // frame i
int t = d.getDelay(i); // display duration of frame in milliseconds
// do something with frame
}
</pre>
No copyright asserted on the source code of this class. May be used for any
purpose, however, refer to the Unisys LZW patent for any additional
restrictions. Please forward any corrections to kweiner@fmsware.com.</div>
<dl>
<dt><span class="simpleTagLabel">Author:</span></dt>
<dd>Kevin Weiner, FM Software; LZW decoder adapted from John Cristy's
ImageMagick.</dd>
</dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- =========== FIELD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.summary">
<!-- -->
</a>
<h3>Field Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Field and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../gifAnimation/GifDecoder.html#STATUS_FORMAT_ERROR">STATUS_FORMAT_ERROR</a></span></code>
<div class="block">File read status: Error decoding file (may be partially decoded)</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../gifAnimation/GifDecoder.html#STATUS_OK">STATUS_OK</a></span></code>
<div class="block">File read status: No errors.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../gifAnimation/GifDecoder.html#STATUS_OPEN_ERROR">STATUS_OPEN_ERROR</a></span></code>
<div class="block">File read status: Unable to open source.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../gifAnimation/GifDecoder.html#GifDecoder--">GifDecoder</a></span>()</code>&nbsp;</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../gifAnimation/GifDecoder.html#getDelay-int-">getDelay</a></span>(int&nbsp;n)</code>
<div class="block">Gets display duration for specified frame.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/awt/image/BufferedImage.html?is-external=true" title="class or interface in java.awt.image">BufferedImage</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../gifAnimation/GifDecoder.html#getFrame-int-">getFrame</a></span>(int&nbsp;n)</code>
<div class="block">Gets the image contents of frame n.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../gifAnimation/GifDecoder.html#getFrameCount--">getFrameCount</a></span>()</code>
<div class="block">Gets the number of frames read from file.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/awt/Dimension.html?is-external=true" title="class or interface in java.awt">Dimension</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../gifAnimation/GifDecoder.html#getFrameSize--">getFrameSize</a></span>()</code>
<div class="block">Gets image size.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/awt/image/BufferedImage.html?is-external=true" title="class or interface in java.awt.image">BufferedImage</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../gifAnimation/GifDecoder.html#getImage--">getImage</a></span>()</code>
<div class="block">Gets the first (or only) image read.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../gifAnimation/GifDecoder.html#getLoopCount--">getLoopCount</a></span>()</code>
<div class="block">Gets the "Netscape" iteration count, if any.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../gifAnimation/GifDecoder.html#read-java.io.BufferedInputStream-">read</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/BufferedInputStream.html?is-external=true" title="class or interface in java.io">BufferedInputStream</a>&nbsp;is)</code>
<div class="block">Reads GIF image from stream</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../gifAnimation/GifDecoder.html#read-java.io.InputStream-">read</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;is)</code>
<div class="block">Reads GIF image from stream</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../gifAnimation/GifDecoder.html#read-java.lang.String-">read</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;name)</code>
<div class="block">Reads GIF file from specified file/URL source (URL assumed if name contains
":/" or "file:")</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3>
<code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.detail">
<!-- -->
</a>
<h3>Field Detail</h3>
<a name="STATUS_OK">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>STATUS_OK</h4>
<pre>public static final&nbsp;int STATUS_OK</pre>
<div class="block">File read status: No errors.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../constant-values.html#gifAnimation.GifDecoder.STATUS_OK">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="STATUS_FORMAT_ERROR">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>STATUS_FORMAT_ERROR</h4>
<pre>public static final&nbsp;int STATUS_FORMAT_ERROR</pre>
<div class="block">File read status: Error decoding file (may be partially decoded)</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../constant-values.html#gifAnimation.GifDecoder.STATUS_FORMAT_ERROR">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="STATUS_OPEN_ERROR">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>STATUS_OPEN_ERROR</h4>
<pre>public static final&nbsp;int STATUS_OPEN_ERROR</pre>
<div class="block">File read status: Unable to open source.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../constant-values.html#gifAnimation.GifDecoder.STATUS_OPEN_ERROR">Constant Field Values</a></dd>
</dl>
</li>
</ul>
</li>
</ul>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="GifDecoder--">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>GifDecoder</h4>
<pre>public&nbsp;GifDecoder()</pre>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="getDelay-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getDelay</h4>
<pre>public&nbsp;int&nbsp;getDelay(int&nbsp;n)</pre>
<div class="block">Gets display duration for specified frame.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>n</code> - int index of frame</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>delay in milliseconds</dd>
</dl>
</li>
</ul>
<a name="getFrameCount--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getFrameCount</h4>
<pre>public&nbsp;int&nbsp;getFrameCount()</pre>
<div class="block">Gets the number of frames read from file.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>frame count</dd>
</dl>
</li>
</ul>
<a name="getImage--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getImage</h4>
<pre>public&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/awt/image/BufferedImage.html?is-external=true" title="class or interface in java.awt.image">BufferedImage</a>&nbsp;getImage()</pre>
<div class="block">Gets the first (or only) image read.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>BufferedImage containing first frame, or null if none.</dd>
</dl>
</li>
</ul>
<a name="getLoopCount--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getLoopCount</h4>
<pre>public&nbsp;int&nbsp;getLoopCount()</pre>
<div class="block">Gets the "Netscape" iteration count, if any. A count of 0 means repeat
indefinitiely.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>iteration count if one was specified, else 1.</dd>
</dl>
</li>
</ul>
<a name="getFrame-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getFrame</h4>
<pre>public&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/awt/image/BufferedImage.html?is-external=true" title="class or interface in java.awt.image">BufferedImage</a>&nbsp;getFrame(int&nbsp;n)</pre>
<div class="block">Gets the image contents of frame n.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>n</code> - : frame number</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>BufferedImage representation of frame, or null if n is invalid.</dd>
</dl>
</li>
</ul>
<a name="getFrameSize--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getFrameSize</h4>
<pre>public&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/awt/Dimension.html?is-external=true" title="class or interface in java.awt">Dimension</a>&nbsp;getFrameSize()</pre>
<div class="block">Gets image size.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>GIF image dimensions</dd>
</dl>
</li>
</ul>
<a name="read-java.io.BufferedInputStream-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>read</h4>
<pre>public&nbsp;int&nbsp;read(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/BufferedInputStream.html?is-external=true" title="class or interface in java.io">BufferedInputStream</a>&nbsp;is)</pre>
<div class="block">Reads GIF image from stream</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>is</code> - : BufferedInputStream containing GIF file.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>read status code (0 = no errors)</dd>
</dl>
</li>
</ul>
<a name="read-java.io.InputStream-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>read</h4>
<pre>public&nbsp;int&nbsp;read(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;is)</pre>
<div class="block">Reads GIF image from stream</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>is</code> - : InputStream containing GIF file.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>read status code (0 = no errors)</dd>
</dl>
</li>
</ul>
<a name="read-java.lang.String-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>read</h4>
<pre>public&nbsp;int&nbsp;read(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;name)</pre>
<div class="block">Reads GIF file from specified file/URL source (URL assumed if name contains
":/" or "file:")</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - : String containing source</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>read status code (0 = no errors)</dd>
</dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../gifAnimation/package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../deprecated-list.html">Deprecated</a></li>
<li><a href="../index-all.html">Index</a></li>
<li><a href="../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../gifAnimation/Gif.html" title="class in gifAnimation"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../gifAnimation/GifEncoder.html" title="class in gifAnimation"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../index.html?gifAnimation/GifDecoder.html" target="_top">Frames</a></li>
<li><a href="GifDecoder.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Processing Library GifAnimation by Patrick Meister, Jerome Saint-Clair. ${library.copyright}</small></p>
</body>
</html>
+530
Ver Arquivo
@@ -0,0 +1,530 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_45) on Tue Sep 29 23:37:43 CEST 2015 -->
<title>GifEncoder (Javadocs: GifAnimation)</title>
<meta name="date" content="2015-09-29">
<link rel="stylesheet" type="text/css" href="../stylesheet.css" title="Style">
<script type="text/javascript" src="../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="GifEncoder (Javadocs: GifAnimation)";
}
}
catch(err) {
}
//-->
var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../gifAnimation/package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../deprecated-list.html">Deprecated</a></li>
<li><a href="../index-all.html">Index</a></li>
<li><a href="../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../gifAnimation/GifDecoder.html" title="class in gifAnimation"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../gifAnimation/GifMaker.html" title="class in gifAnimation"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../index.html?gifAnimation/GifEncoder.html" target="_top">Frames</a></li>
<li><a href="GifEncoder.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">gifAnimation</div>
<h2 title="Class GifEncoder" class="title">Class GifEncoder</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li>gifAnimation.GifEncoder</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre>public class <span class="typeNameLabel">GifEncoder</span>
extends <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></pre>
<div class="block">Class AnimatedGifEncoder - Encodes a GIF file consisting of one or more
frames.
<pre>
Example:
AnimatedGifEncoder e = new AnimatedGifEncoder();
e.start(outputFileName);
e.setDelay(1000); // 1 frame per sec
e.addFrame(image1);
e.addFrame(image2);
e.finish();
</pre>
No copyright asserted on the source code of this class. May be used for any
purpose, however, refer to the Unisys LZW patent for restrictions on use of
the associated LZWEncoder class. Please forward any corrections to
kweiner@fmsware.com.</div>
<dl>
<dt><span class="simpleTagLabel">Author:</span></dt>
<dd>Kevin Weiner, FM Software</dd>
</dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../gifAnimation/GifEncoder.html#GifEncoder--">GifEncoder</a></span>()</code>&nbsp;</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../gifAnimation/GifEncoder.html#addFrame-java.awt.image.BufferedImage-">addFrame</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/awt/image/BufferedImage.html?is-external=true" title="class or interface in java.awt.image">BufferedImage</a>&nbsp;im)</code>
<div class="block">Adds next GIF frame.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../gifAnimation/GifEncoder.html#finish--">finish</a></span>()</code>
<div class="block">Flushes any pending data and closes output file.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../gifAnimation/GifEncoder.html#setDelay-int-">setDelay</a></span>(int&nbsp;ms)</code>
<div class="block">Sets the delay time between each frame, or changes it for subsequent frames
(applies to last frame added).</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../gifAnimation/GifEncoder.html#setDispose-int-">setDispose</a></span>(int&nbsp;code)</code>
<div class="block">Sets the GIF frame disposal code for the last added frame and any
subsequent frames.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../gifAnimation/GifEncoder.html#setFrameRate-float-">setFrameRate</a></span>(float&nbsp;fps)</code>
<div class="block">Sets frame rate in frames per second.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../gifAnimation/GifEncoder.html#setQuality-int-">setQuality</a></span>(int&nbsp;quality)</code>
<div class="block">Sets quality of color quantization (conversion of images to the maximum 256
colors allowed by the GIF specification).</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../gifAnimation/GifEncoder.html#setRepeat-int-">setRepeat</a></span>(int&nbsp;iter)</code>
<div class="block">Sets the number of times the set of GIF frames should be played.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../gifAnimation/GifEncoder.html#setSize-int-int-">setSize</a></span>(int&nbsp;w,
int&nbsp;h)</code>
<div class="block">Sets the GIF frame size.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../gifAnimation/GifEncoder.html#setTransparent-java.awt.Color-">setTransparent</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/awt/Color.html?is-external=true" title="class or interface in java.awt">Color</a>&nbsp;c)</code>
<div class="block">Sets the transparent color for the last added frame and any subsequent
frames.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../gifAnimation/GifEncoder.html#start-java.io.OutputStream-">start</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;os)</code>
<div class="block">Initiates GIF file creation on the given stream.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../gifAnimation/GifEncoder.html#start-java.lang.String-">start</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;file)</code>
<div class="block">Initiates writing of a GIF file with the specified name.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3>
<code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="GifEncoder--">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>GifEncoder</h4>
<pre>public&nbsp;GifEncoder()</pre>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="setDelay-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setDelay</h4>
<pre>public&nbsp;void&nbsp;setDelay(int&nbsp;ms)</pre>
<div class="block">Sets the delay time between each frame, or changes it for subsequent frames
(applies to last frame added).</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>ms</code> - int delay time in milliseconds</dd>
</dl>
</li>
</ul>
<a name="setDispose-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setDispose</h4>
<pre>public&nbsp;void&nbsp;setDispose(int&nbsp;code)</pre>
<div class="block">Sets the GIF frame disposal code for the last added frame and any
subsequent frames. Default is 0 if no transparent color has been set,
otherwise 2.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>code</code> - int disposal code.</dd>
</dl>
</li>
</ul>
<a name="setRepeat-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setRepeat</h4>
<pre>public&nbsp;void&nbsp;setRepeat(int&nbsp;iter)</pre>
<div class="block">Sets the number of times the set of GIF frames should be played. Default is
1; 0 means play indefinitely. Must be invoked before the first image is
added.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>iter</code> - int number of iterations.</dd>
</dl>
</li>
</ul>
<a name="setTransparent-java.awt.Color-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setTransparent</h4>
<pre>public&nbsp;void&nbsp;setTransparent(<a href="http://docs.oracle.com/javase/7/docs/api/java/awt/Color.html?is-external=true" title="class or interface in java.awt">Color</a>&nbsp;c)</pre>
<div class="block">Sets the transparent color for the last added frame and any subsequent
frames. Since all colors are subject to modification in the quantization
process, the color in the final palette for each frame closest to the given
color becomes the transparent color for that frame. May be set to null to
indicate no transparent color.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>c</code> - Color to be treated as transparent on display.</dd>
</dl>
</li>
</ul>
<a name="addFrame-java.awt.image.BufferedImage-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addFrame</h4>
<pre>public&nbsp;boolean&nbsp;addFrame(<a href="http://docs.oracle.com/javase/7/docs/api/java/awt/image/BufferedImage.html?is-external=true" title="class or interface in java.awt.image">BufferedImage</a>&nbsp;im)</pre>
<div class="block">Adds next GIF frame. The frame is not written immediately, but is actually
deferred until the next frame is received so that timing data can be
inserted. Invoking <code>finish()</code> flushes all frames. If
<code>setSize</code> was not invoked, the size of the first image is used
for all subsequent frames.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>im</code> - BufferedImage containing frame to write.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if successful.</dd>
</dl>
</li>
</ul>
<a name="finish--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>finish</h4>
<pre>public&nbsp;boolean&nbsp;finish()</pre>
<div class="block">Flushes any pending data and closes output file. If writing to an
OutputStream, the stream is not closed.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if data output closed</dd>
</dl>
</li>
</ul>
<a name="setFrameRate-float-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setFrameRate</h4>
<pre>public&nbsp;void&nbsp;setFrameRate(float&nbsp;fps)</pre>
<div class="block">Sets frame rate in frames per second. Equivalent to
<code>setDelay(1000/fps)</code>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>fps</code> - float frame rate (frames per second)</dd>
</dl>
</li>
</ul>
<a name="setQuality-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setQuality</h4>
<pre>public&nbsp;void&nbsp;setQuality(int&nbsp;quality)</pre>
<div class="block">Sets quality of color quantization (conversion of images to the maximum 256
colors allowed by the GIF specification). Lower values (minimum = 1)
produce better colors, but slow processing significantly. 10 is the
default, and produces good color mapping at reasonable speeds. Values
greater than 20 do not yield significant improvements in speed.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>quality</code> - int greater than 0.</dd>
</dl>
</li>
</ul>
<a name="setSize-int-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setSize</h4>
<pre>public&nbsp;void&nbsp;setSize(int&nbsp;w,
int&nbsp;h)</pre>
<div class="block">Sets the GIF frame size. The default size is the size of the first frame
added if this method is not invoked.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>w</code> - int frame width.</dd>
<dd><code>h</code> - int frame width.</dd>
</dl>
</li>
</ul>
<a name="start-java.io.OutputStream-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>start</h4>
<pre>public&nbsp;boolean&nbsp;start(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;os)</pre>
<div class="block">Initiates GIF file creation on the given stream. The stream is not closed
automatically.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>os</code> - OutputStream on which GIF images are written.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>false if initial write failed.</dd>
</dl>
</li>
</ul>
<a name="start-java.lang.String-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>start</h4>
<pre>public&nbsp;boolean&nbsp;start(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;file)</pre>
<div class="block">Initiates writing of a GIF file with the specified name.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>file</code> - String containing output file name.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>false if open or initial write failed.</dd>
</dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../gifAnimation/package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../deprecated-list.html">Deprecated</a></li>
<li><a href="../index-all.html">Index</a></li>
<li><a href="../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../gifAnimation/GifDecoder.html" title="class in gifAnimation"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../gifAnimation/GifMaker.html" title="class in gifAnimation"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../index.html?gifAnimation/GifEncoder.html" target="_top">Frames</a></li>
<li><a href="GifEncoder.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Processing Library GifAnimation by Patrick Meister, Jerome Saint-Clair. ${library.copyright}</small></p>
</body>
</html>
Diff do arquivo suprimido porque uma ou mais linhas são muito longas
+23
Ver Arquivo
@@ -0,0 +1,23 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_45) on Tue Sep 29 23:37:43 CEST 2015 -->
<title>gifAnimation (Javadocs: GifAnimation)</title>
<meta name="date" content="2015-09-29">
<link rel="stylesheet" type="text/css" href="../stylesheet.css" title="Style">
<script type="text/javascript" src="../script.js"></script>
</head>
<body>
<h1 class="bar"><a href="../gifAnimation/package-summary.html" target="classFrame">gifAnimation</a></h1>
<div class="indexContainer">
<h2 title="Classes">Classes</h2>
<ul title="Classes">
<li><a href="Gif.html" title="class in gifAnimation" target="classFrame">Gif</a></li>
<li><a href="GifDecoder.html" title="class in gifAnimation" target="classFrame">GifDecoder</a></li>
<li><a href="GifEncoder.html" title="class in gifAnimation" target="classFrame">GifEncoder</a></li>
<li><a href="GifMaker.html" title="class in gifAnimation" target="classFrame">GifMaker</a></li>
</ul>
</div>
</body>
</html>
+156
Ver Arquivo
@@ -0,0 +1,156 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_45) on Tue Sep 29 23:37:43 CEST 2015 -->
<title>gifAnimation (Javadocs: GifAnimation)</title>
<meta name="date" content="2015-09-29">
<link rel="stylesheet" type="text/css" href="../stylesheet.css" title="Style">
<script type="text/javascript" src="../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="gifAnimation (Javadocs: GifAnimation)";
}
}
catch(err) {
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../gifAnimation/package-summary.html">Package</a></li>
<li>Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../deprecated-list.html">Deprecated</a></li>
<li><a href="../index-all.html">Index</a></li>
<li><a href="../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev&nbsp;Package</li>
<li>Next&nbsp;Package</li>
</ul>
<ul class="navList">
<li><a href="../index.html?gifAnimation/package-summary.html" target="_top">Frames</a></li>
<li><a href="package-summary.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<div class="header">
<h1 title="Package" class="title">Package&nbsp;gifAnimation</h1>
</div>
<div class="contentContainer">
<ul class="blockList">
<li class="blockList">
<table class="typeSummary" border="0" cellpadding="3" cellspacing="0" summary="Class Summary table, listing classes, and an explanation">
<caption><span>Class Summary</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Class</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colFirst"><a href="../gifAnimation/Gif.html" title="class in gifAnimation">Gif</a></td>
<td class="colLast">&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><a href="../gifAnimation/GifDecoder.html" title="class in gifAnimation">GifDecoder</a></td>
<td class="colLast">
<div class="block">Class GifDecoder - Decodes a GIF file into one or more frames.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><a href="../gifAnimation/GifEncoder.html" title="class in gifAnimation">GifEncoder</a></td>
<td class="colLast">
<div class="block">Class AnimatedGifEncoder - Encodes a GIF file consisting of one or more
frames.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><a href="../gifAnimation/GifMaker.html" title="class in gifAnimation">GifMaker</a></td>
<td class="colLast">&nbsp;</td>
</tr>
</tbody>
</table>
</li>
</ul>
</div>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../gifAnimation/package-summary.html">Package</a></li>
<li>Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../deprecated-list.html">Deprecated</a></li>
<li><a href="../index-all.html">Index</a></li>
<li><a href="../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev&nbsp;Package</li>
<li>Next&nbsp;Package</li>
</ul>
<ul class="navList">
<li><a href="../index.html?gifAnimation/package-summary.html" target="_top">Frames</a></li>
<li><a href="package-summary.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Processing Library GifAnimation by Patrick Meister, Jerome Saint-Clair. ${library.copyright}</small></p>
</body>
</html>
+137
Ver Arquivo
@@ -0,0 +1,137 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_45) on Tue Sep 29 23:37:43 CEST 2015 -->
<title>gifAnimation Class Hierarchy (Javadocs: GifAnimation)</title>
<meta name="date" content="2015-09-29">
<link rel="stylesheet" type="text/css" href="../stylesheet.css" title="Style">
<script type="text/javascript" src="../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="gifAnimation Class Hierarchy (Javadocs: GifAnimation)";
}
}
catch(err) {
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../gifAnimation/package-summary.html">Package</a></li>
<li>Class</li>
<li class="navBarCell1Rev">Tree</li>
<li><a href="../deprecated-list.html">Deprecated</a></li>
<li><a href="../index-all.html">Index</a></li>
<li><a href="../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev</li>
<li>Next</li>
</ul>
<ul class="navList">
<li><a href="../index.html?gifAnimation/package-tree.html" target="_top">Frames</a></li>
<li><a href="package-tree.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<div class="header">
<h1 class="title">Hierarchy For Package gifAnimation</h1>
</div>
<div class="contentContainer">
<h2 title="Class Hierarchy">Class Hierarchy</h2>
<ul>
<li type="circle">java.lang.<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang"><span class="typeNameLink">Object</span></a>
<ul>
<li type="circle">gifAnimation.<a href="../gifAnimation/GifDecoder.html" title="class in gifAnimation"><span class="typeNameLink">GifDecoder</span></a></li>
<li type="circle">gifAnimation.<a href="../gifAnimation/GifEncoder.html" title="class in gifAnimation"><span class="typeNameLink">GifEncoder</span></a></li>
<li type="circle">gifAnimation.<a href="../gifAnimation/GifMaker.html" title="class in gifAnimation"><span class="typeNameLink">GifMaker</span></a> (implements processing.core.<a href="http://processing.org/reference/javadoc/core/processing/core/PConstants.html?is-external=true" title="class or interface in processing.core">PConstants</a>)</li>
<li type="circle">processing.core.<a href="http://processing.org/reference/javadoc/core/processing/core/PImage.html?is-external=true" title="class or interface in processing.core"><span class="typeNameLink">PImage</span></a> (implements java.lang.<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Cloneable.html?is-external=true" title="class or interface in java.lang">Cloneable</a>, processing.core.<a href="http://processing.org/reference/javadoc/core/processing/core/PConstants.html?is-external=true" title="class or interface in processing.core">PConstants</a>)
<ul>
<li type="circle">gifAnimation.<a href="../gifAnimation/Gif.html" title="class in gifAnimation"><span class="typeNameLink">Gif</span></a> (implements processing.core.<a href="http://processing.org/reference/javadoc/core/processing/core/PConstants.html?is-external=true" title="class or interface in processing.core">PConstants</a>, java.lang.<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Runnable.html?is-external=true" title="class or interface in java.lang">Runnable</a>)</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../gifAnimation/package-summary.html">Package</a></li>
<li>Class</li>
<li class="navBarCell1Rev">Tree</li>
<li><a href="../deprecated-list.html">Deprecated</a></li>
<li><a href="../index-all.html">Index</a></li>
<li><a href="../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev</li>
<li>Next</li>
</ul>
<ul class="navList">
<li><a href="../index.html?gifAnimation/package-tree.html" target="_top">Frames</a></li>
<li><a href="package-tree.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Processing Library GifAnimation by Patrick Meister, Jerome Saint-Clair. ${library.copyright}</small></p>
</body>
</html>
+218
Ver Arquivo
@@ -0,0 +1,218 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_45) on Tue Sep 29 23:37:43 CEST 2015 -->
<title>API Help (Javadocs: GifAnimation)</title>
<meta name="date" content="2015-09-29">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
<script type="text/javascript" src="script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="API Help (Javadocs: GifAnimation)";
}
}
catch(err) {
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="gifAnimation/package-summary.html">Package</a></li>
<li>Class</li>
<li><a href="overview-tree.html">Tree</a></li>
<li><a href="deprecated-list.html">Deprecated</a></li>
<li><a href="index-all.html">Index</a></li>
<li class="navBarCell1Rev">Help</li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev</li>
<li>Next</li>
</ul>
<ul class="navList">
<li><a href="index.html?help-doc.html" target="_top">Frames</a></li>
<li><a href="help-doc.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<div class="header">
<h1 class="title">How This API Document Is Organized</h1>
<div class="subTitle">This API (Application Programming Interface) document has pages corresponding to the items in the navigation bar, described as follows.</div>
</div>
<div class="contentContainer">
<ul class="blockList">
<li class="blockList">
<h2>Package</h2>
<p>Each package has a page that contains a list of its classes and interfaces, with a summary for each. This page can contain six categories:</p>
<ul>
<li>Interfaces (italic)</li>
<li>Classes</li>
<li>Enums</li>
<li>Exceptions</li>
<li>Errors</li>
<li>Annotation Types</li>
</ul>
</li>
<li class="blockList">
<h2>Class/Interface</h2>
<p>Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions:</p>
<ul>
<li>Class inheritance diagram</li>
<li>Direct Subclasses</li>
<li>All Known Subinterfaces</li>
<li>All Known Implementing Classes</li>
<li>Class/interface declaration</li>
<li>Class/interface description</li>
</ul>
<ul>
<li>Nested Class Summary</li>
<li>Field Summary</li>
<li>Constructor Summary</li>
<li>Method Summary</li>
</ul>
<ul>
<li>Field Detail</li>
<li>Constructor Detail</li>
<li>Method Detail</li>
</ul>
<p>Each summary entry contains the first sentence from the detailed description for that item. The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.</p>
</li>
<li class="blockList">
<h2>Annotation Type</h2>
<p>Each annotation type has its own separate page with the following sections:</p>
<ul>
<li>Annotation Type declaration</li>
<li>Annotation Type description</li>
<li>Required Element Summary</li>
<li>Optional Element Summary</li>
<li>Element Detail</li>
</ul>
</li>
<li class="blockList">
<h2>Enum</h2>
<p>Each enum has its own separate page with the following sections:</p>
<ul>
<li>Enum declaration</li>
<li>Enum description</li>
<li>Enum Constant Summary</li>
<li>Enum Constant Detail</li>
</ul>
</li>
<li class="blockList">
<h2>Tree (Class Hierarchy)</h2>
<p>There is a <a href="overview-tree.html">Class Hierarchy</a> page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. The classes are organized by inheritance structure starting with <code>java.lang.Object</code>. The interfaces do not inherit from <code>java.lang.Object</code>.</p>
<ul>
<li>When viewing the Overview page, clicking on "Tree" displays the hierarchy for all packages.</li>
<li>When viewing a particular package, class or interface page, clicking "Tree" displays the hierarchy for only that package.</li>
</ul>
</li>
<li class="blockList">
<h2>Deprecated API</h2>
<p>The <a href="deprecated-list.html">Deprecated API</a> page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to improvements, and a replacement API is usually given. Deprecated APIs may be removed in future implementations.</p>
</li>
<li class="blockList">
<h2>Index</h2>
<p>The <a href="index-all.html">Index</a> contains an alphabetic list of all classes, interfaces, constructors, methods, and fields.</p>
</li>
<li class="blockList">
<h2>Prev/Next</h2>
<p>These links take you to the next or previous class, interface, package, or related page.</p>
</li>
<li class="blockList">
<h2>Frames/No Frames</h2>
<p>These links show and hide the HTML frames. All pages are available with or without frames.</p>
</li>
<li class="blockList">
<h2>All Classes</h2>
<p>The <a href="allclasses-noframe.html">All Classes</a> link shows all classes and interfaces except non-static nested types.</p>
</li>
<li class="blockList">
<h2>Serialized Form</h2>
<p>Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to re-implementors, not to developers using the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See also" section of the class description.</p>
</li>
<li class="blockList">
<h2>Constant Field Values</h2>
<p>The <a href="constant-values.html">Constant Field Values</a> page lists the static final fields and their values.</p>
</li>
</ul>
<span class="emphasizedPhrase">This help file applies to API documentation generated using the standard doclet.</span></div>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="gifAnimation/package-summary.html">Package</a></li>
<li>Class</li>
<li><a href="overview-tree.html">Tree</a></li>
<li><a href="deprecated-list.html">Deprecated</a></li>
<li><a href="index-all.html">Index</a></li>
<li class="navBarCell1Rev">Help</li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev</li>
<li>Next</li>
</ul>
<ul class="navList">
<li><a href="index.html?help-doc.html" target="_top">Frames</a></li>
<li><a href="help-doc.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Processing Library GifAnimation by Patrick Meister, Jerome Saint-Clair. ${library.copyright}</small></p>
</body>
</html>
+404
Ver Arquivo
@@ -0,0 +1,404 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_45) on Tue Sep 29 23:37:43 CEST 2015 -->
<title>Index (Javadocs: GifAnimation)</title>
<meta name="date" content="2015-09-29">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
<script type="text/javascript" src="script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Index (Javadocs: GifAnimation)";
}
}
catch(err) {
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="gifAnimation/package-summary.html">Package</a></li>
<li>Class</li>
<li><a href="overview-tree.html">Tree</a></li>
<li><a href="deprecated-list.html">Deprecated</a></li>
<li class="navBarCell1Rev">Index</li>
<li><a href="help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev</li>
<li>Next</li>
</ul>
<ul class="navList">
<li><a href="index.html?index-all.html" target="_top">Frames</a></li>
<li><a href="index-all.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<div class="contentContainer"><a href="#I:A">A</a>&nbsp;<a href="#I:C">C</a>&nbsp;<a href="#I:D">D</a>&nbsp;<a href="#I:F">F</a>&nbsp;<a href="#I:G">G</a>&nbsp;<a href="#I:I">I</a>&nbsp;<a href="#I:J">J</a>&nbsp;<a href="#I:L">L</a>&nbsp;<a href="#I:N">N</a>&nbsp;<a href="#I:P">P</a>&nbsp;<a href="#I:R">R</a>&nbsp;<a href="#I:S">S</a>&nbsp;<a href="#I:V">V</a>&nbsp;<a name="I:A">
<!-- -->
</a>
<h2 class="title">A</h2>
<dl>
<dt><span class="memberNameLink"><a href="gifAnimation/GifEncoder.html#addFrame-java.awt.image.BufferedImage-">addFrame(BufferedImage)</a></span> - Method in class gifAnimation.<a href="gifAnimation/GifEncoder.html" title="class in gifAnimation">GifEncoder</a></dt>
<dd>
<div class="block">Adds next GIF frame.</div>
</dd>
<dt><span class="memberNameLink"><a href="gifAnimation/GifMaker.html#addFrame--">addFrame()</a></span> - Method in class gifAnimation.<a href="gifAnimation/GifMaker.html" title="class in gifAnimation">GifMaker</a></dt>
<dd>&nbsp;</dd>
<dt><span class="memberNameLink"><a href="gifAnimation/GifMaker.html#addFrame-processing.core.PImage-">addFrame(PImage)</a></span> - Method in class gifAnimation.<a href="gifAnimation/GifMaker.html" title="class in gifAnimation">GifMaker</a></dt>
<dd>&nbsp;</dd>
<dt><span class="memberNameLink"><a href="gifAnimation/GifMaker.html#addFrame-int:A-int-int-">addFrame(int[], int, int)</a></span> - Method in class gifAnimation.<a href="gifAnimation/GifMaker.html" title="class in gifAnimation">GifMaker</a></dt>
<dd>&nbsp;</dd>
</dl>
<a name="I:C">
<!-- -->
</a>
<h2 class="title">C</h2>
<dl>
<dt><span class="memberNameLink"><a href="gifAnimation/Gif.html#currentFrame--">currentFrame()</a></span> - Method in class gifAnimation.<a href="gifAnimation/Gif.html" title="class in gifAnimation">Gif</a></dt>
<dd>&nbsp;</dd>
</dl>
<a name="I:D">
<!-- -->
</a>
<h2 class="title">D</h2>
<dl>
<dt><span class="memberNameLink"><a href="gifAnimation/Gif.html#dispose--">dispose()</a></span> - Method in class gifAnimation.<a href="gifAnimation/Gif.html" title="class in gifAnimation">Gif</a></dt>
<dd>&nbsp;</dd>
<dt><span class="memberNameLink"><a href="gifAnimation/GifMaker.html#dispose--">dispose()</a></span> - Method in class gifAnimation.<a href="gifAnimation/GifMaker.html" title="class in gifAnimation">GifMaker</a></dt>
<dd>&nbsp;</dd>
<dt><span class="memberNameLink"><a href="gifAnimation/GifMaker.html#DISPOSE_KEEP">DISPOSE_KEEP</a></span> - Static variable in class gifAnimation.<a href="gifAnimation/GifMaker.html" title="class in gifAnimation">GifMaker</a></dt>
<dd>&nbsp;</dd>
<dt><span class="memberNameLink"><a href="gifAnimation/GifMaker.html#DISPOSE_NOTHING">DISPOSE_NOTHING</a></span> - Static variable in class gifAnimation.<a href="gifAnimation/GifMaker.html" title="class in gifAnimation">GifMaker</a></dt>
<dd>&nbsp;</dd>
<dt><span class="memberNameLink"><a href="gifAnimation/GifMaker.html#DISPOSE_REMOVE">DISPOSE_REMOVE</a></span> - Static variable in class gifAnimation.<a href="gifAnimation/GifMaker.html" title="class in gifAnimation">GifMaker</a></dt>
<dd>&nbsp;</dd>
<dt><span class="memberNameLink"><a href="gifAnimation/GifMaker.html#DISPOSE_RESTORE_BACKGROUND">DISPOSE_RESTORE_BACKGROUND</a></span> - Static variable in class gifAnimation.<a href="gifAnimation/GifMaker.html" title="class in gifAnimation">GifMaker</a></dt>
<dd>&nbsp;</dd>
</dl>
<a name="I:F">
<!-- -->
</a>
<h2 class="title">F</h2>
<dl>
<dt><span class="memberNameLink"><a href="gifAnimation/GifEncoder.html#finish--">finish()</a></span> - Method in class gifAnimation.<a href="gifAnimation/GifEncoder.html" title="class in gifAnimation">GifEncoder</a></dt>
<dd>
<div class="block">Flushes any pending data and closes output file.</div>
</dd>
<dt><span class="memberNameLink"><a href="gifAnimation/GifMaker.html#finish--">finish()</a></span> - Method in class gifAnimation.<a href="gifAnimation/GifMaker.html" title="class in gifAnimation">GifMaker</a></dt>
<dd>&nbsp;</dd>
</dl>
<a name="I:G">
<!-- -->
</a>
<h2 class="title">G</h2>
<dl>
<dt><span class="memberNameLink"><a href="gifAnimation/GifDecoder.html#getDelay-int-">getDelay(int)</a></span> - Method in class gifAnimation.<a href="gifAnimation/GifDecoder.html" title="class in gifAnimation">GifDecoder</a></dt>
<dd>
<div class="block">Gets display duration for specified frame.</div>
</dd>
<dt><span class="memberNameLink"><a href="gifAnimation/GifDecoder.html#getFrame-int-">getFrame(int)</a></span> - Method in class gifAnimation.<a href="gifAnimation/GifDecoder.html" title="class in gifAnimation">GifDecoder</a></dt>
<dd>
<div class="block">Gets the image contents of frame n.</div>
</dd>
<dt><span class="memberNameLink"><a href="gifAnimation/GifDecoder.html#getFrameCount--">getFrameCount()</a></span> - Method in class gifAnimation.<a href="gifAnimation/GifDecoder.html" title="class in gifAnimation">GifDecoder</a></dt>
<dd>
<div class="block">Gets the number of frames read from file.</div>
</dd>
<dt><span class="memberNameLink"><a href="gifAnimation/GifDecoder.html#getFrameSize--">getFrameSize()</a></span> - Method in class gifAnimation.<a href="gifAnimation/GifDecoder.html" title="class in gifAnimation">GifDecoder</a></dt>
<dd>
<div class="block">Gets image size.</div>
</dd>
<dt><span class="memberNameLink"><a href="gifAnimation/GifDecoder.html#getImage--">getImage()</a></span> - Method in class gifAnimation.<a href="gifAnimation/GifDecoder.html" title="class in gifAnimation">GifDecoder</a></dt>
<dd>
<div class="block">Gets the first (or only) image read.</div>
</dd>
<dt><span class="memberNameLink"><a href="gifAnimation/GifDecoder.html#getLoopCount--">getLoopCount()</a></span> - Method in class gifAnimation.<a href="gifAnimation/GifDecoder.html" title="class in gifAnimation">GifDecoder</a></dt>
<dd>
<div class="block">Gets the "Netscape" iteration count, if any.</div>
</dd>
<dt><span class="memberNameLink"><a href="gifAnimation/Gif.html#getPImages-processing.core.PApplet-java.lang.String-">getPImages(PApplet, String)</a></span> - Static method in class gifAnimation.<a href="gifAnimation/Gif.html" title="class in gifAnimation">Gif</a></dt>
<dd>&nbsp;</dd>
<dt><span class="memberNameLink"><a href="gifAnimation/Gif.html#getPImages--">getPImages()</a></span> - Method in class gifAnimation.<a href="gifAnimation/Gif.html" title="class in gifAnimation">Gif</a></dt>
<dd>&nbsp;</dd>
<dt><span class="memberNameLink"><a href="gifAnimation/Gif.html#getRepeat--">getRepeat()</a></span> - Method in class gifAnimation.<a href="gifAnimation/Gif.html" title="class in gifAnimation">Gif</a></dt>
<dd>&nbsp;</dd>
<dt><a href="gifAnimation/Gif.html" title="class in gifAnimation"><span class="typeNameLink">Gif</span></a> - Class in <a href="gifAnimation/package-summary.html">gifAnimation</a></dt>
<dd>&nbsp;</dd>
<dt><span class="memberNameLink"><a href="gifAnimation/Gif.html#Gif-processing.core.PApplet-java.lang.String-">Gif(PApplet, String)</a></span> - Constructor for class gifAnimation.<a href="gifAnimation/Gif.html" title="class in gifAnimation">Gif</a></dt>
<dd>&nbsp;</dd>
<dt><a href="gifAnimation/package-summary.html">gifAnimation</a> - package gifAnimation</dt>
<dd>&nbsp;</dd>
<dt><a href="gifAnimation/GifDecoder.html" title="class in gifAnimation"><span class="typeNameLink">GifDecoder</span></a> - Class in <a href="gifAnimation/package-summary.html">gifAnimation</a></dt>
<dd>
<div class="block">Class GifDecoder - Decodes a GIF file into one or more frames.</div>
</dd>
<dt><span class="memberNameLink"><a href="gifAnimation/GifDecoder.html#GifDecoder--">GifDecoder()</a></span> - Constructor for class gifAnimation.<a href="gifAnimation/GifDecoder.html" title="class in gifAnimation">GifDecoder</a></dt>
<dd>&nbsp;</dd>
<dt><a href="gifAnimation/GifEncoder.html" title="class in gifAnimation"><span class="typeNameLink">GifEncoder</span></a> - Class in <a href="gifAnimation/package-summary.html">gifAnimation</a></dt>
<dd>
<div class="block">Class AnimatedGifEncoder - Encodes a GIF file consisting of one or more
frames.</div>
</dd>
<dt><span class="memberNameLink"><a href="gifAnimation/GifEncoder.html#GifEncoder--">GifEncoder()</a></span> - Constructor for class gifAnimation.<a href="gifAnimation/GifEncoder.html" title="class in gifAnimation">GifEncoder</a></dt>
<dd>&nbsp;</dd>
<dt><a href="gifAnimation/GifMaker.html" title="class in gifAnimation"><span class="typeNameLink">GifMaker</span></a> - Class in <a href="gifAnimation/package-summary.html">gifAnimation</a></dt>
<dd>&nbsp;</dd>
<dt><span class="memberNameLink"><a href="gifAnimation/GifMaker.html#GifMaker-processing.core.PApplet-java.lang.String-">GifMaker(PApplet, String)</a></span> - Constructor for class gifAnimation.<a href="gifAnimation/GifMaker.html" title="class in gifAnimation">GifMaker</a></dt>
<dd>&nbsp;</dd>
<dt><span class="memberNameLink"><a href="gifAnimation/GifMaker.html#GifMaker-processing.core.PApplet-java.lang.String-int-">GifMaker(PApplet, String, int)</a></span> - Constructor for class gifAnimation.<a href="gifAnimation/GifMaker.html" title="class in gifAnimation">GifMaker</a></dt>
<dd>&nbsp;</dd>
<dt><span class="memberNameLink"><a href="gifAnimation/GifMaker.html#GifMaker-processing.core.PApplet-java.lang.String-int-int-">GifMaker(PApplet, String, int, int)</a></span> - Constructor for class gifAnimation.<a href="gifAnimation/GifMaker.html" title="class in gifAnimation">GifMaker</a></dt>
<dd>&nbsp;</dd>
</dl>
<a name="I:I">
<!-- -->
</a>
<h2 class="title">I</h2>
<dl>
<dt><span class="memberNameLink"><a href="gifAnimation/Gif.html#ignoreRepeat--">ignoreRepeat()</a></span> - Method in class gifAnimation.<a href="gifAnimation/Gif.html" title="class in gifAnimation">Gif</a></dt>
<dd>&nbsp;</dd>
<dt><span class="memberNameLink"><a href="gifAnimation/Gif.html#isIgnoringRepeat--">isIgnoringRepeat()</a></span> - Method in class gifAnimation.<a href="gifAnimation/Gif.html" title="class in gifAnimation">Gif</a></dt>
<dd>&nbsp;</dd>
<dt><span class="memberNameLink"><a href="gifAnimation/Gif.html#isLooping--">isLooping()</a></span> - Method in class gifAnimation.<a href="gifAnimation/Gif.html" title="class in gifAnimation">Gif</a></dt>
<dd>&nbsp;</dd>
<dt><span class="memberNameLink"><a href="gifAnimation/Gif.html#isPlaying--">isPlaying()</a></span> - Method in class gifAnimation.<a href="gifAnimation/Gif.html" title="class in gifAnimation">Gif</a></dt>
<dd>&nbsp;</dd>
</dl>
<a name="I:J">
<!-- -->
</a>
<h2 class="title">J</h2>
<dl>
<dt><span class="memberNameLink"><a href="gifAnimation/Gif.html#jump-int-">jump(int)</a></span> - Method in class gifAnimation.<a href="gifAnimation/Gif.html" title="class in gifAnimation">Gif</a></dt>
<dd>
<div class="block">Jump to a specific location (in frames).</div>
</dd>
</dl>
<a name="I:L">
<!-- -->
</a>
<h2 class="title">L</h2>
<dl>
<dt><span class="memberNameLink"><a href="gifAnimation/Gif.html#loop--">loop()</a></span> - Method in class gifAnimation.<a href="gifAnimation/Gif.html" title="class in gifAnimation">Gif</a></dt>
<dd>
<div class="block">Begin playing the animation, with repeat.</div>
</dd>
</dl>
<a name="I:N">
<!-- -->
</a>
<h2 class="title">N</h2>
<dl>
<dt><span class="memberNameLink"><a href="gifAnimation/Gif.html#noLoop--">noLoop()</a></span> - Method in class gifAnimation.<a href="gifAnimation/Gif.html" title="class in gifAnimation">Gif</a></dt>
<dd>
<div class="block">Shut off the repeating loop.</div>
</dd>
</dl>
<a name="I:P">
<!-- -->
</a>
<h2 class="title">P</h2>
<dl>
<dt><span class="memberNameLink"><a href="gifAnimation/Gif.html#pause--">pause()</a></span> - Method in class gifAnimation.<a href="gifAnimation/Gif.html" title="class in gifAnimation">Gif</a></dt>
<dd>
<div class="block">Pause the animation at its current frame.</div>
</dd>
<dt><span class="memberNameLink"><a href="gifAnimation/Gif.html#play--">play()</a></span> - Method in class gifAnimation.<a href="gifAnimation/Gif.html" title="class in gifAnimation">Gif</a></dt>
<dd>
<div class="block">Begin playing the animation, with no repeat.</div>
</dd>
</dl>
<a name="I:R">
<!-- -->
</a>
<h2 class="title">R</h2>
<dl>
<dt><span class="memberNameLink"><a href="gifAnimation/GifDecoder.html#read-java.io.BufferedInputStream-">read(BufferedInputStream)</a></span> - Method in class gifAnimation.<a href="gifAnimation/GifDecoder.html" title="class in gifAnimation">GifDecoder</a></dt>
<dd>
<div class="block">Reads GIF image from stream</div>
</dd>
<dt><span class="memberNameLink"><a href="gifAnimation/GifDecoder.html#read-java.io.InputStream-">read(InputStream)</a></span> - Method in class gifAnimation.<a href="gifAnimation/GifDecoder.html" title="class in gifAnimation">GifDecoder</a></dt>
<dd>
<div class="block">Reads GIF image from stream</div>
</dd>
<dt><span class="memberNameLink"><a href="gifAnimation/GifDecoder.html#read-java.lang.String-">read(String)</a></span> - Method in class gifAnimation.<a href="gifAnimation/GifDecoder.html" title="class in gifAnimation">GifDecoder</a></dt>
<dd>
<div class="block">Reads GIF file from specified file/URL source (URL assumed if name contains
":/" or "file:")</div>
</dd>
<dt><span class="memberNameLink"><a href="gifAnimation/Gif.html#run--">run()</a></span> - Method in class gifAnimation.<a href="gifAnimation/Gif.html" title="class in gifAnimation">Gif</a></dt>
<dd>&nbsp;</dd>
</dl>
<a name="I:S">
<!-- -->
</a>
<h2 class="title">S</h2>
<dl>
<dt><span class="memberNameLink"><a href="gifAnimation/GifEncoder.html#setDelay-int-">setDelay(int)</a></span> - Method in class gifAnimation.<a href="gifAnimation/GifEncoder.html" title="class in gifAnimation">GifEncoder</a></dt>
<dd>
<div class="block">Sets the delay time between each frame, or changes it for subsequent frames
(applies to last frame added).</div>
</dd>
<dt><span class="memberNameLink"><a href="gifAnimation/GifMaker.html#setDelay-int-">setDelay(int)</a></span> - Method in class gifAnimation.<a href="gifAnimation/GifMaker.html" title="class in gifAnimation">GifMaker</a></dt>
<dd>&nbsp;</dd>
<dt><span class="memberNameLink"><a href="gifAnimation/GifEncoder.html#setDispose-int-">setDispose(int)</a></span> - Method in class gifAnimation.<a href="gifAnimation/GifEncoder.html" title="class in gifAnimation">GifEncoder</a></dt>
<dd>
<div class="block">Sets the GIF frame disposal code for the last added frame and any
subsequent frames.</div>
</dd>
<dt><span class="memberNameLink"><a href="gifAnimation/GifMaker.html#setDispose-int-">setDispose(int)</a></span> - Method in class gifAnimation.<a href="gifAnimation/GifMaker.html" title="class in gifAnimation">GifMaker</a></dt>
<dd>&nbsp;</dd>
<dt><span class="memberNameLink"><a href="gifAnimation/GifEncoder.html#setFrameRate-float-">setFrameRate(float)</a></span> - Method in class gifAnimation.<a href="gifAnimation/GifEncoder.html" title="class in gifAnimation">GifEncoder</a></dt>
<dd>
<div class="block">Sets frame rate in frames per second.</div>
</dd>
<dt><span class="memberNameLink"><a href="gifAnimation/GifEncoder.html#setQuality-int-">setQuality(int)</a></span> - Method in class gifAnimation.<a href="gifAnimation/GifEncoder.html" title="class in gifAnimation">GifEncoder</a></dt>
<dd>
<div class="block">Sets quality of color quantization (conversion of images to the maximum 256
colors allowed by the GIF specification).</div>
</dd>
<dt><span class="memberNameLink"><a href="gifAnimation/GifMaker.html#setQuality-int-">setQuality(int)</a></span> - Method in class gifAnimation.<a href="gifAnimation/GifMaker.html" title="class in gifAnimation">GifMaker</a></dt>
<dd>
<div class="block">description taken from GifEncoder-class: Sets quality of color
quantization (conversion of images to the maximum 256 colors allowed by
the GIF specification).</div>
</dd>
<dt><span class="memberNameLink"><a href="gifAnimation/GifEncoder.html#setRepeat-int-">setRepeat(int)</a></span> - Method in class gifAnimation.<a href="gifAnimation/GifEncoder.html" title="class in gifAnimation">GifEncoder</a></dt>
<dd>
<div class="block">Sets the number of times the set of GIF frames should be played.</div>
</dd>
<dt><span class="memberNameLink"><a href="gifAnimation/GifMaker.html#setRepeat-int-">setRepeat(int)</a></span> - Method in class gifAnimation.<a href="gifAnimation/GifMaker.html" title="class in gifAnimation">GifMaker</a></dt>
<dd>&nbsp;</dd>
<dt><span class="memberNameLink"><a href="gifAnimation/GifEncoder.html#setSize-int-int-">setSize(int, int)</a></span> - Method in class gifAnimation.<a href="gifAnimation/GifEncoder.html" title="class in gifAnimation">GifEncoder</a></dt>
<dd>
<div class="block">Sets the GIF frame size.</div>
</dd>
<dt><span class="memberNameLink"><a href="gifAnimation/GifMaker.html#setSize-int-int-">setSize(int, int)</a></span> - Method in class gifAnimation.<a href="gifAnimation/GifMaker.html" title="class in gifAnimation">GifMaker</a></dt>
<dd>&nbsp;</dd>
<dt><span class="memberNameLink"><a href="gifAnimation/GifEncoder.html#setTransparent-java.awt.Color-">setTransparent(Color)</a></span> - Method in class gifAnimation.<a href="gifAnimation/GifEncoder.html" title="class in gifAnimation">GifEncoder</a></dt>
<dd>
<div class="block">Sets the transparent color for the last added frame and any subsequent
frames.</div>
</dd>
<dt><span class="memberNameLink"><a href="gifAnimation/GifMaker.html#setTransparent-int-">setTransparent(int)</a></span> - Method in class gifAnimation.<a href="gifAnimation/GifMaker.html" title="class in gifAnimation">GifMaker</a></dt>
<dd>&nbsp;</dd>
<dt><span class="memberNameLink"><a href="gifAnimation/GifMaker.html#setTransparent-float-float-float-">setTransparent(float, float, float)</a></span> - Method in class gifAnimation.<a href="gifAnimation/GifMaker.html" title="class in gifAnimation">GifMaker</a></dt>
<dd>&nbsp;</dd>
<dt><span class="memberNameLink"><a href="gifAnimation/GifMaker.html#setTransparent-int-int-int-">setTransparent(int, int, int)</a></span> - Method in class gifAnimation.<a href="gifAnimation/GifMaker.html" title="class in gifAnimation">GifMaker</a></dt>
<dd>&nbsp;</dd>
<dt><span class="memberNameLink"><a href="gifAnimation/GifEncoder.html#start-java.io.OutputStream-">start(OutputStream)</a></span> - Method in class gifAnimation.<a href="gifAnimation/GifEncoder.html" title="class in gifAnimation">GifEncoder</a></dt>
<dd>
<div class="block">Initiates GIF file creation on the given stream.</div>
</dd>
<dt><span class="memberNameLink"><a href="gifAnimation/GifEncoder.html#start-java.lang.String-">start(String)</a></span> - Method in class gifAnimation.<a href="gifAnimation/GifEncoder.html" title="class in gifAnimation">GifEncoder</a></dt>
<dd>
<div class="block">Initiates writing of a GIF file with the specified name.</div>
</dd>
<dt><span class="memberNameLink"><a href="gifAnimation/GifDecoder.html#STATUS_FORMAT_ERROR">STATUS_FORMAT_ERROR</a></span> - Static variable in class gifAnimation.<a href="gifAnimation/GifDecoder.html" title="class in gifAnimation">GifDecoder</a></dt>
<dd>
<div class="block">File read status: Error decoding file (may be partially decoded)</div>
</dd>
<dt><span class="memberNameLink"><a href="gifAnimation/GifDecoder.html#STATUS_OK">STATUS_OK</a></span> - Static variable in class gifAnimation.<a href="gifAnimation/GifDecoder.html" title="class in gifAnimation">GifDecoder</a></dt>
<dd>
<div class="block">File read status: No errors.</div>
</dd>
<dt><span class="memberNameLink"><a href="gifAnimation/GifDecoder.html#STATUS_OPEN_ERROR">STATUS_OPEN_ERROR</a></span> - Static variable in class gifAnimation.<a href="gifAnimation/GifDecoder.html" title="class in gifAnimation">GifDecoder</a></dt>
<dd>
<div class="block">File read status: Unable to open source.</div>
</dd>
<dt><span class="memberNameLink"><a href="gifAnimation/Gif.html#stop--">stop()</a></span> - Method in class gifAnimation.<a href="gifAnimation/Gif.html" title="class in gifAnimation">Gif</a></dt>
<dd>
<div class="block">Stop the animation, and rewind.</div>
</dd>
</dl>
<a name="I:V">
<!-- -->
</a>
<h2 class="title">V</h2>
<dl>
<dt><span class="memberNameLink"><a href="gifAnimation/Gif.html#version--">version()</a></span> - Static method in class gifAnimation.<a href="gifAnimation/Gif.html" title="class in gifAnimation">Gif</a></dt>
<dd>&nbsp;</dd>
</dl>
<a href="#I:A">A</a>&nbsp;<a href="#I:C">C</a>&nbsp;<a href="#I:D">D</a>&nbsp;<a href="#I:F">F</a>&nbsp;<a href="#I:G">G</a>&nbsp;<a href="#I:I">I</a>&nbsp;<a href="#I:J">J</a>&nbsp;<a href="#I:L">L</a>&nbsp;<a href="#I:N">N</a>&nbsp;<a href="#I:P">P</a>&nbsp;<a href="#I:R">R</a>&nbsp;<a href="#I:S">S</a>&nbsp;<a href="#I:V">V</a>&nbsp;</div>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="gifAnimation/package-summary.html">Package</a></li>
<li>Class</li>
<li><a href="overview-tree.html">Tree</a></li>
<li><a href="deprecated-list.html">Deprecated</a></li>
<li class="navBarCell1Rev">Index</li>
<li><a href="help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev</li>
<li>Next</li>
</ul>
<ul class="navList">
<li><a href="index.html?index-all.html" target="_top">Frames</a></li>
<li><a href="index-all.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Processing Library GifAnimation by Patrick Meister, Jerome Saint-Clair. ${library.copyright}</small></p>
</body>
</html>
+71
Ver Arquivo
@@ -0,0 +1,71 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_45) on Tue Sep 29 23:37:43 CEST 2015 -->
<title>Javadocs: GifAnimation</title>
<script type="text/javascript">
targetPage = "" + window.location.search;
if (targetPage != "" && targetPage != "undefined")
targetPage = targetPage.substring(1);
if (targetPage.indexOf(":") != -1 || (targetPage != "" && !validURL(targetPage)))
targetPage = "undefined";
function validURL(url) {
try {
url = decodeURIComponent(url);
}
catch (error) {
return false;
}
var pos = url.indexOf(".html");
if (pos == -1 || pos != url.length - 5)
return false;
var allowNumber = false;
var allowSep = false;
var seenDot = false;
for (var i = 0; i < url.length - 5; i++) {
var ch = url.charAt(i);
if ('a' <= ch && ch <= 'z' ||
'A' <= ch && ch <= 'Z' ||
ch == '$' ||
ch == '_' ||
ch.charCodeAt(0) > 127) {
allowNumber = true;
allowSep = true;
} else if ('0' <= ch && ch <= '9'
|| ch == '-') {
if (!allowNumber)
return false;
} else if (ch == '/' || ch == '.') {
if (!allowSep)
return false;
allowNumber = false;
allowSep = false;
if (ch == '.')
seenDot = true;
if (ch == '/' && seenDot)
return false;
} else {
return false;
}
}
return true;
}
function loadFrames() {
if (targetPage != "" && targetPage != "undefined")
top.classFrame.location = top.targetPage;
}
</script>
</head>
<frameset cols="20%,80%" title="Documentation frame" onload="top.loadFrames()">
<frame src="allclasses-frame.html" name="packageFrame" title="All classes and interfaces (except non-static nested types)">
<frame src="gifAnimation/package-summary.html" name="classFrame" title="Package, class and interface descriptions" scrolling="yes">
<noframes>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<h2>Frame Alert</h2>
<p>This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client. Link to <a href="gifAnimation/package-summary.html">Non-frame version</a>.</p>
</noframes>
</frameset>
</html>
+141
Ver Arquivo
@@ -0,0 +1,141 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_45) on Tue Sep 29 23:37:43 CEST 2015 -->
<title>Class Hierarchy (Javadocs: GifAnimation)</title>
<meta name="date" content="2015-09-29">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
<script type="text/javascript" src="script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Class Hierarchy (Javadocs: GifAnimation)";
}
}
catch(err) {
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="gifAnimation/package-summary.html">Package</a></li>
<li>Class</li>
<li class="navBarCell1Rev">Tree</li>
<li><a href="deprecated-list.html">Deprecated</a></li>
<li><a href="index-all.html">Index</a></li>
<li><a href="help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev</li>
<li>Next</li>
</ul>
<ul class="navList">
<li><a href="index.html?overview-tree.html" target="_top">Frames</a></li>
<li><a href="overview-tree.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<div class="header">
<h1 class="title">Hierarchy For All Packages</h1>
<span class="packageHierarchyLabel">Package Hierarchies:</span>
<ul class="horizontal">
<li><a href="gifAnimation/package-tree.html">gifAnimation</a></li>
</ul>
</div>
<div class="contentContainer">
<h2 title="Class Hierarchy">Class Hierarchy</h2>
<ul>
<li type="circle">java.lang.<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang"><span class="typeNameLink">Object</span></a>
<ul>
<li type="circle">gifAnimation.<a href="gifAnimation/GifDecoder.html" title="class in gifAnimation"><span class="typeNameLink">GifDecoder</span></a></li>
<li type="circle">gifAnimation.<a href="gifAnimation/GifEncoder.html" title="class in gifAnimation"><span class="typeNameLink">GifEncoder</span></a></li>
<li type="circle">gifAnimation.<a href="gifAnimation/GifMaker.html" title="class in gifAnimation"><span class="typeNameLink">GifMaker</span></a> (implements processing.core.<a href="http://processing.org/reference/javadoc/core/processing/core/PConstants.html?is-external=true" title="class or interface in processing.core">PConstants</a>)</li>
<li type="circle">processing.core.<a href="http://processing.org/reference/javadoc/core/processing/core/PImage.html?is-external=true" title="class or interface in processing.core"><span class="typeNameLink">PImage</span></a> (implements java.lang.<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Cloneable.html?is-external=true" title="class or interface in java.lang">Cloneable</a>, processing.core.<a href="http://processing.org/reference/javadoc/core/processing/core/PConstants.html?is-external=true" title="class or interface in processing.core">PConstants</a>)
<ul>
<li type="circle">gifAnimation.<a href="gifAnimation/Gif.html" title="class in gifAnimation"><span class="typeNameLink">Gif</span></a> (implements processing.core.<a href="http://processing.org/reference/javadoc/core/processing/core/PConstants.html?is-external=true" title="class or interface in processing.core">PConstants</a>, java.lang.<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Runnable.html?is-external=true" title="class or interface in java.lang">Runnable</a>)</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="gifAnimation/package-summary.html">Package</a></li>
<li>Class</li>
<li class="navBarCell1Rev">Tree</li>
<li><a href="deprecated-list.html">Deprecated</a></li>
<li><a href="index-all.html">Index</a></li>
<li><a href="help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev</li>
<li>Next</li>
</ul>
<ul class="navList">
<li><a href="index.html?overview-tree.html" target="_top">Frames</a></li>
<li><a href="overview-tree.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Processing Library GifAnimation by Patrick Meister, Jerome Saint-Clair. ${library.copyright}</small></p>
</body>
</html>
+1
Ver Arquivo
@@ -0,0 +1 @@
gifAnimation
+30
Ver Arquivo
@@ -0,0 +1,30 @@
function show(type)
{
count = 0;
for (var key in methods) {
var row = document.getElementById(key);
if ((methods[key] & type) != 0) {
row.style.display = '';
row.className = (count++ % 2) ? rowColor : altColor;
}
else
row.style.display = 'none';
}
updateTabs(type);
}
function updateTabs(type)
{
for (var value in tabs) {
var sNode = document.getElementById(tabs[value][0]);
var spanNode = sNode.firstChild;
if (value == type) {
sNode.className = activeTableTab;
spanNode.innerHTML = tabs[value][1];
}
else {
sNode.className = tableTab;
spanNode.innerHTML = "<a href=\"javascript:show("+ value + ");\">" + tabs[value][1] + "</a>";
}
}
}
+310
Ver Arquivo
@@ -0,0 +1,310 @@
/* Javadoc style sheet */
/* Define colors, fonts and other style attributes here to override the defaults */
/* processingLibs style by andreas schlegel, sojamo */
body {
margin : 0;
padding : 0;
padding-left : 10px;
padding-right : 8px;
background-color : #FFFFFF;
font-family : Verdana, Geneva, Arial, Helvetica, sans-serif;
font-size : 100%;
font-size : 0.7em;
font-weight : normal;
line-height : normal;
margin-bottom:30px;
}
/* Headings */
h1, h2, h3, h4, h5, th {
font-family :Arial, Helvetica, sans-serif;
font-size:1.2em;
}
p {
font-size : 1em;
width:80%;
}
pre, code {
font-family : "Courier New", Courier, monospace;
font-size : 12px;
line-height : normal;
}
table {
border:0;
margin-bottom:10px;
margin-top:10px;
}
tr, td {
border-top: 0px solid;
border-left: 0px solid;
padding-top:8px;
padding-bottom:8px;
}
hr {
border:0;
height:1px;
padding:0;
margin:0;
margin-bottom:4px;
}
dd, th, td, font {
font-size:1.0em;
line-height:1.0em;
}
dt {
margin-bottom:0px;
}
dd {
margin-top:2px;
margin-bottom:4px;
}
a {
text-decoration: underline;
font-weight: normal;
}
a:hover,
a:active {
text-decoration: underline;
font-weight: normal;
}
a:visited,
a:link:visited {
text-decoration: underline;
font-weight: normal;
}
img {
border: 0px solid #000000;
}
/* Navigation bar fonts */
.NavBarCell1 {
border:0;
}
.NavBarCell1Rev {
border:0;
}
.NavBarFont1 {
font-family: Arial, Helvetica, sans-serif;
font-size:1.1em;
}
.NavBarFont1 b {
font-weight:normal;
}
.NavBarFont1:after, .NavBarFont1Rev:after {
font-weight:normal;
content: " \\";
}
.NavBarFont1Rev {
font-family: Arial, Helvetica, sans-serif;
font-size:1.1em;
}
.NavBarFont1Rev b {
font-family: Arial, Helvetica, sans-serif;
font-size:1.1em;
font-weight:normal;
}
.NavBarCell2 {
font-family: Arial, Helvetica, sans-serif;
}
.NavBarCell3 {
font-family: Arial, Helvetica, sans-serif;
}
font.FrameItemFont {
font-family: Helvetica, Arial, sans-serif;
font-size:1.1em;
line-height:1.1em;
}
font.FrameHeadingFont {
font-family: Helvetica, Arial, sans-serif;
line-height:32px;
}
/* Font used in left-hand frame lists */
.FrameTitleFont {
font-family: Helvetica, Arial, sans-serif
}
.toggleList {
padding:0;
margin:0;
margin-top:12px;
}
.toggleList dt {
font-weight:bold;
font-size:12px;
font-family:arial,sans-serif;
padding:0px;
margin:10px 0px 10px 0px;
}
.toggleList dt span {
font-family: monospace;
padding:0;
margin:0;
}
.toggleList dd {
margin:0;
padding:0;
}
html.isjs .toggleList dd {
display: none;
}
.toggleList pre {
padding: 4px 4px 4px 4px;
}
/* COLORS */
pre, code {
color: #000000;
}
body {
color : #333333;
background-color :#FFFFFF;
}
h1, h2, h3, h4, h5, h6 {
color:#555;
}
a,
.toggleList dt {
color: #1a7eb0;
}
a:hover,
a:active {
color: #1a7eb0;
}
a:visited,
a:link:visited {
color: #1a7eb0;
}
td,tr {
border-color: #999999;
}
hr {
color:#999999;
background:#999999;
}
.TableHeadingColor {
background: #dcdcdc;
color: #555;
}
.TableSubHeadingColor {
background: #EEEEFF
}
.TableRowColor {
background: #FFFFFF
}
.NavBarCell1 {
background-color:#dcdcdc;
color:#000;
}
.NavBarCell1 a {
color:#333;
}
.NavBarCell1Rev {
background-color:transparent;
}
.NavBarFont1 {
color:#333;
}
.NavBarFont1Rev {
color:#fff;
}
.NavBarCell2 {
background-color:#999;
}
.NavBarCell2 a {
color:#fff;
}
.NavBarCell3 {
background-color:#dcdcdc;
}
+322
Ver Arquivo
@@ -0,0 +1,322 @@
/*
* GifAnimation is a processing library to play gif animations and to
* extract frames from a gif file. It can also export animated GIF animations
* This file class is under a GPL license. The Decoder used to open the
* gif files was written by Kevin Weiner. please see the separate copyright
* notice in the header of the GifDecoder / GifEncoder class.
*
* by extrapixel 2007
* http://extrapixel.ch
*
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package gifAnimation;
import java.awt.image.BufferedImage;
import java.io.*;
import processing.core.*;
public class Gif extends PImage implements PConstants, Runnable {
private PApplet parent;
Thread runner;
// if the animation is currently playing
private boolean play;
// if the animation is currently looping
private boolean loop;
// wether the repeat setting from the gif-file should be ignored
private boolean ignoreRepeatSetting = false;
// nr of repeats specified in the gif-file. 0 means repeat forever
private int repeatSetting = 1;
// how often this animation has repeated since last call to play()
private int repeatCount = 0;
// the current frame number
private int currentFrame;
// array containing the frames as PImages
private PImage[] frames;
// array containing the delay in ms of every frame
private int[] delays;
// last time the frame changed
private int lastJumpTime;
// version
private static String version = "3.1";
public Gif(PApplet parent, String filename) {
// this creates a fake image so that the first time this
// attempts to draw, something happens that's not an exception
super(1, 1, ARGB);
this.parent = parent;
// create the GifDecoder
GifDecoder gifDecoder = createDecoder(parent, filename);
// fill up the PImage and the delay arrays
frames = extractFrames(gifDecoder);
delays = extractDelays(gifDecoder);
// get the GIFs repeat count
repeatSetting = gifDecoder.getLoopCount();
// re-init our PImage with the new size
super.init(frames[0].width, frames[0].height, ARGB);
jump(0);
parent.registerMethod("dispose", this);
// and now, make the magic happen
runner = new Thread(this);
runner.start();
}
public void dispose() {
// fin
// System.out.println("disposing");
stop();
runner = null;
}
/*
* the thread's run method
*/
public void run() {
while (Thread.currentThread() == runner) {
try {
Thread.sleep(5);
} catch (InterruptedException e) {
}
if (play) {
// if playing, check if we need to go to next frame
if (parent.millis() - lastJumpTime >= delays[currentFrame]) {
// we need to jump
if (currentFrame == frames.length - 1) {
// its the last frame
if (loop) {
jump(0); // loop is on, so rewind
} else if (!ignoreRepeatSetting) {
// we're not looping, but we need to respect the
// GIF's repeat setting
repeatCount++;
if (repeatSetting == 0) {
// we need to repeat forever
jump(0);
} else if (repeatCount == repeatSetting) {
// stop repeating, we've reached the repeat
// setting
stop();
}
} else {
// no loop & ignoring the repeat setting, so just
// stop.
stop();
}
} else {
// go to the next frame
jump(currentFrame + 1);
}
}
}
}
}
/*
* creates an input stream using processings openStream() method to read
* from the sketch data-directory
*/
private static InputStream createInputStream(PApplet parent, String filename) {
InputStream inputStream = parent.createInput(filename);
return inputStream;
}
/*
* in case someone wants to mess with the frames directly, they can get an
* array of PImages containing the animation frames. without having a
* gif-object with a seperate thread
*
* it takes a filename of a file in the datafolder.
*/
public static PImage[] getPImages(PApplet parent, String filename) {
GifDecoder gifDecoder = createDecoder(parent, filename);
return extractFrames(gifDecoder);
}
/*
* probably someone wants all the frames even if he has a playback-gif...
*/
public PImage[] getPImages() {
return frames;
}
/*
* creates a GifDecoder object and loads a gif file
*/
private static GifDecoder createDecoder(PApplet parent, String filename) {
GifDecoder gifDecoder = new GifDecoder();
gifDecoder.read(createInputStream(parent, filename));
return gifDecoder;
}
/*
* creates a PImage-array of gif frames in a GifDecoder object
*/
private static PImage[] extractFrames(GifDecoder gifDecoder) {
int n = gifDecoder.getFrameCount();
PImage[] frames = new PImage[n];
for (int i = 0; i < n; i++) {
BufferedImage frame = gifDecoder.getFrame(i);
frames[i] = new PImage(frame.getWidth(), frame.getHeight(), ARGB);
System.arraycopy(frame.getRGB(0, 0, frame.getWidth(), frame
.getHeight(), null, 0, frame.getWidth()), 0,
frames[i].pixels, 0, frame.getWidth() * frame.getHeight());
}
return frames;
}
/*
* creates an int-array of frame delays in the gifDecoder object
*/
private static int[] extractDelays(GifDecoder gifDecoder) {
int n = gifDecoder.getFrameCount();
int[] delays = new int[n];
for (int i = 0; i < n; i++) {
delays[i] = gifDecoder.getDelay(i); // display duration of frame in
// milliseconds
}
return delays;
}
/*
* Can be called to ignore the repeat-count set in the gif-file. this does
* not affect loop()/noLoop() settings.
*/
public void ignoreRepeat() {
ignoreRepeatSetting = true;
}
/*
* returns the number of repeats that is specified in the gif-file 0 means
* repeat forever
*/
public int getRepeat() {
return repeatSetting;
}
/*
* returns true if this GIF object is playing
*/
public boolean isPlaying() {
return play;
}
/*
* returns the current frame number
*/
public int currentFrame() {
return currentFrame;
}
/*
* returns true if the animation is set to loop
*/
public boolean isLooping() {
return loop;
}
/*
* returns true if this animation is set to ignore the file's repeat setting
*/
public boolean isIgnoringRepeat() {
return ignoreRepeatSetting;
}
/*
* returns the version of the library
*/
public static String version() {
return version;
}
/*
* following methods mimic the behaviour of processing's movie class.
*/
/**
* Begin playing the animation, with no repeat.
*/
public void play() {
play = true;
if (!ignoreRepeatSetting) {
repeatCount = 0;
}
}
/**
* Begin playing the animation, with repeat.
*/
public void loop() {
play = true;
loop = true;
}
/**
* Shut off the repeating loop.
*/
public void noLoop() {
loop = false;
}
/**
* Pause the animation at its current frame.
*/
public void pause() {
// System.out.println("pause");
play = false;
}
/**
* Stop the animation, and rewind.
*/
public void stop() {
//System.out.println("stop");
play = false;
currentFrame = 0;
repeatCount = 0;
}
/**
* Jump to a specific location (in frames). if the frame does not exist, go
* to last frame
* @param where : file location (in sketch)
*/
public void jump(int where) {
if (frames.length > where) {
currentFrame = where;
// update the pixel-array
loadPixels();
System.arraycopy(frames[currentFrame].pixels, 0, pixels, 0, width
* height);
updatePixels();
// set the jump time
lastJumpTime = parent.millis();
}
}
}
+802
Ver Arquivo
@@ -0,0 +1,802 @@
package gifAnimation;
import java.awt.AlphaComposite;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Graphics2D;
import java.awt.Rectangle;
import java.awt.image.BufferedImage;
import java.awt.image.DataBufferInt;
import java.io.BufferedInputStream;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import java.util.ArrayList;
/**
* Class GifDecoder - Decodes a GIF file into one or more frames. <br>
*
* <pre>
* Example:
* GifDecoder d = new GifDecoder();
* d.read(&quot;sample.gif&quot;);
* int n = d.getFrameCount();
* for (int i = 0; i &lt; n; i++) {
* BufferedImage frame = d.getFrame(i); // frame i
* int t = d.getDelay(i); // display duration of frame in milliseconds
* // do something with frame
* }
* </pre>
*
* No copyright asserted on the source code of this class. May be used for any
* purpose, however, refer to the Unisys LZW patent for any additional
* restrictions. Please forward any corrections to kweiner@fmsware.com.
*
* @author Kevin Weiner, FM Software; LZW decoder adapted from John Cristy's
* ImageMagick.
* @version 1.03 November 2003
*
*/
public class GifDecoder {
/**
* File read status: No errors.
*/
public static final int STATUS_OK = 0;
/**
* File read status: Error decoding file (may be partially decoded)
*/
public static final int STATUS_FORMAT_ERROR = 1;
/**
* File read status: Unable to open source.
*/
public static final int STATUS_OPEN_ERROR = 2;
protected BufferedInputStream in;
protected int status;
protected int width; // full image width
protected int height; // full image height
protected boolean gctFlag; // global color table used
protected int gctSize; // size of global color table
protected int loopCount = 1; // iterations; 0 = repeat forever
protected int[] gct; // global color table
protected int[] lct; // local color table
protected int[] act; // active color table
protected int bgIndex; // background color index
protected int bgColor; // background color
protected int lastBgColor; // previous bg color
protected int pixelAspect; // pixel aspect ratio
protected boolean lctFlag; // local color table flag
protected boolean interlace; // interlace flag
protected int lctSize; // local color table size
protected int ix, iy, iw, ih; // current image rectangle
protected Rectangle lastRect; // last image rect
protected BufferedImage image; // current frame
protected BufferedImage lastImage; // previous frame
protected byte[] block = new byte[256]; // current data block
protected int blockSize = 0; // block size
// last graphic control extension info
protected int dispose = 0;
// 0=no action; 1=leave in place; 2=restore to bg; 3=restore to prev
protected int lastDispose = 0;
protected boolean transparency = false; // use transparent color
protected int delay = 0; // delay in milliseconds
protected int transIndex; // transparent color index
protected static final int MaxStackSize = 4096;
// max decoder pixel stack size
// LZW decoder working arrays
protected short[] prefix;
protected byte[] suffix;
protected byte[] pixelStack;
protected byte[] pixels;
protected ArrayList<GifFrame> frames; // frames read from current file
protected int frameCount;
static class GifFrame {
public GifFrame(BufferedImage im, int del) {
image = im;
delay = del;
}
public BufferedImage image;
public int delay;
}
/**
* Gets display duration for specified frame.
*
* @param n
* int index of frame
* @return delay in milliseconds
*/
public int getDelay(int n) {
//
delay = -1;
if ((n >= 0) && (n < frameCount)) {
delay = frames.get(n).delay;
}
return delay;
}
/**
* Gets the number of frames read from file.
*
* @return frame count
*/
public int getFrameCount() {
return frameCount;
}
/**
* Gets the first (or only) image read.
*
* @return BufferedImage containing first frame, or null if none.
*/
public BufferedImage getImage() {
return getFrame(0);
}
/**
* Gets the "Netscape" iteration count, if any. A count of 0 means repeat
* indefinitiely.
*
* @return iteration count if one was specified, else 1.
*/
public int getLoopCount() {
return loopCount;
}
/**
* Creates new frame image from current data (and previous frames as specified
* by their disposition codes).
*/
protected void setPixels() {
// expose destination image's pixels as int array
int[] dest = ((DataBufferInt) image.getRaster().getDataBuffer()).getData();
// fill in starting image contents based on last image's dispose code
if (lastDispose > 0) {
if (lastDispose == 3) {
// use image before last
int n = frameCount - 2;
if (n > 0) {
lastImage = getFrame(n - 1);
} else {
lastImage = null;
}
}
if (lastImage != null) {
int[] prev = ((DataBufferInt) lastImage.getRaster().getDataBuffer()).getData();
System.arraycopy(prev, 0, dest, 0, width * height);
// copy pixels
if (lastDispose == 2) {
// fill last image rect area with background color
Graphics2D g = image.createGraphics();
Color c = null;
if (transparency) {
c = new Color(0, 0, 0, 0); // assume background is transparent
} else {
c = new Color(lastBgColor); // use given background color
}
g.setColor(c);
g.setComposite(AlphaComposite.Src); // replace area
g.fill(lastRect);
g.dispose();
}
}
}
// copy each source line to the appropriate place in the destination
int pass = 1;
int inc = 8;
int iline = 0;
for (int i = 0; i < ih; i++) {
int line = i;
if (interlace) {
if (iline >= ih) {
pass++;
switch (pass) {
case 2:
iline = 4;
break;
case 3:
iline = 2;
inc = 4;
break;
case 4:
iline = 1;
inc = 2;
}
}
line = iline;
iline += inc;
}
line += iy;
if (line < height) {
int k = line * width;
int dx = k + ix; // start of line in dest
int dlim = dx + iw; // end of dest line
if ((k + width) < dlim) {
dlim = k + width; // past dest edge
}
int sx = i * iw; // start of line in source
while (dx < dlim) {
// map color and insert in destination
int index = ((int) pixels[sx++]) & 0xff;
int c = act[index];
if (c != 0) {
dest[dx] = c;
}
dx++;
}
}
}
}
/**
* Gets the image contents of frame n.
* @param n : frame number
* @return BufferedImage representation of frame, or null if n is invalid.
*/
public BufferedImage getFrame(int n) {
BufferedImage im = null;
if ((n >= 0) && (n < frameCount)) {
im = frames.get(n).image;
}
return im;
}
/**
* Gets image size.
*
* @return GIF image dimensions
*/
public Dimension getFrameSize() {
return new Dimension(width, height);
}
/**
* Reads GIF image from stream
*
* @param is : BufferedInputStream containing GIF file.
*
* @return read status code (0 = no errors)
*/
public int read(BufferedInputStream is) {
init();
if (is != null) {
in = is;
readHeader();
if (!err()) {
readContents();
if (frameCount < 0) {
status = STATUS_FORMAT_ERROR;
}
}
} else {
status = STATUS_OPEN_ERROR;
}
try {
is.close();
} catch (IOException e) {
}
return status;
}
/**
* Reads GIF image from stream
*
* @param is : InputStream containing GIF file.
*
* @return read status code (0 = no errors)
*/
public int read(InputStream is) {
init();
if (is != null) {
if (!(is instanceof BufferedInputStream))
is = new BufferedInputStream(is);
in = (BufferedInputStream) is;
readHeader();
if (!err()) {
readContents();
if (frameCount < 0) {
status = STATUS_FORMAT_ERROR;
}
}
} else {
status = STATUS_OPEN_ERROR;
}
try {
is.close();
} catch (IOException e) {
}
return status;
}
/**
* Reads GIF file from specified file/URL source (URL assumed if name contains
* ":/" or "file:")
*
* @param name : String containing source
* @return read status code (0 = no errors)
*/
public int read(String name) {
status = STATUS_OK;
try {
name = name.trim().toLowerCase();
if ((name.indexOf("file:") >= 0) || (name.indexOf(":/") > 0)) {
URL url = new URL(name);
in = new BufferedInputStream(url.openStream());
} else {
in = new BufferedInputStream(new FileInputStream(name));
}
status = read(in);
} catch (IOException e) {
status = STATUS_OPEN_ERROR;
}
return status;
}
/**
* Decodes LZW image data into pixel array. Adapted from John Cristy's
* ImageMagick.
*/
protected void decodeImageData() {
int NullCode = -1;
int npix = iw * ih;
int available, clear, code_mask, code_size, end_of_information, in_code, old_code, bits, code, count, i, datum, data_size, first, top, bi, pi;
if ((pixels == null) || (pixels.length < npix)) {
pixels = new byte[npix]; // allocate new pixel array
}
if (prefix == null)
prefix = new short[MaxStackSize];
if (suffix == null)
suffix = new byte[MaxStackSize];
if (pixelStack == null)
pixelStack = new byte[MaxStackSize + 1];
// Initialize GIF data stream decoder.
data_size = read();
clear = 1 << data_size;
end_of_information = clear + 1;
available = clear + 2;
old_code = NullCode;
code_size = data_size + 1;
code_mask = (1 << code_size) - 1;
for (code = 0; code < clear; code++) {
prefix[code] = 0;
suffix[code] = (byte) code;
}
// Decode GIF pixel stream.
datum = bits = count = first = top = pi = bi = 0;
for (i = 0; i < npix;) {
if (top == 0) {
if (bits < code_size) {
// Load bytes until there are enough bits for a code.
if (count == 0) {
// Read a new data block.
count = readBlock();
if (count <= 0)
break;
bi = 0;
}
datum += (((int) block[bi]) & 0xff) << bits;
bits += 8;
bi++;
count--;
continue;
}
// Get the next code.
code = datum & code_mask;
datum >>= code_size;
bits -= code_size;
// Interpret the code
if ((code > available) || (code == end_of_information))
break;
if (code == clear) {
// Reset decoder.
code_size = data_size + 1;
code_mask = (1 << code_size) - 1;
available = clear + 2;
old_code = NullCode;
continue;
}
if (old_code == NullCode) {
pixelStack[top++] = suffix[code];
old_code = code;
first = code;
continue;
}
in_code = code;
if (code == available) {
pixelStack[top++] = (byte) first;
code = old_code;
}
while (code > clear) {
pixelStack[top++] = suffix[code];
code = prefix[code];
}
first = ((int) suffix[code]) & 0xff;
// Add a new string to the string table,
if (available >= MaxStackSize)
break;
pixelStack[top++] = (byte) first;
prefix[available] = (short) old_code;
suffix[available] = (byte) first;
available++;
if (((available & code_mask) == 0) && (available < MaxStackSize)) {
code_size++;
code_mask += available;
}
old_code = in_code;
}
// Pop a pixel off the pixel stack.
top--;
pixels[pi++] = pixelStack[top];
i++;
}
for (i = pi; i < npix; i++) {
pixels[i] = 0; // clear missing pixels
}
}
/**
* Returns true if an error was encountered during reading/decoding
*/
protected boolean err() {
return status != STATUS_OK;
}
/**
* Initializes or re-initializes reader
*/
protected void init() {
status = STATUS_OK;
frameCount = 0;
frames = new ArrayList<GifFrame>();
gct = null;
lct = null;
}
/**
* Reads a single byte from the input stream.
*/
protected int read() {
int curByte = 0;
try {
curByte = in.read();
} catch (IOException e) {
status = STATUS_FORMAT_ERROR;
}
return curByte;
}
/**
* Reads next variable length block from input.
*
* @return number of bytes stored in "buffer"
*/
protected int readBlock() {
blockSize = read();
int n = 0;
if (blockSize > 0) {
try {
int count = 0;
while (n < blockSize) {
count = in.read(block, n, blockSize - n);
if (count == -1)
break;
n += count;
}
} catch (IOException e) {
}
if (n < blockSize) {
status = STATUS_FORMAT_ERROR;
}
}
return n;
}
/**
* Reads color table as 256 RGB integer values
*
* @param ncolors
* int number of colors to read
* @return int array containing 256 colors (packed ARGB with full alpha)
*/
protected int[] readColorTable(int ncolors) {
int nbytes = 3 * ncolors;
int[] tab = null;
byte[] c = new byte[nbytes];
int n = 0;
try {
n = in.read(c);
} catch (IOException e) {
}
if (n < nbytes) {
status = STATUS_FORMAT_ERROR;
} else {
tab = new int[256]; // max size to avoid bounds checks
int i = 0;
int j = 0;
while (i < ncolors) {
int r = ((int) c[j++]) & 0xff;
int g = ((int) c[j++]) & 0xff;
int b = ((int) c[j++]) & 0xff;
tab[i++] = 0xff000000 | (r << 16) | (g << 8) | b;
}
}
return tab;
}
/**
* Main file parser. Reads GIF content blocks.
*/
protected void readContents() {
// read GIF file content blocks
boolean done = false;
while (!(done || err())) {
int code = read();
switch (code) {
case 0x2C: // image separator
readImage();
break;
case 0x21: // extension
code = read();
switch (code) {
case 0xf9: // graphics control extension
readGraphicControlExt();
break;
case 0xff: // application extension
readBlock();
String app = "";
for (int i = 0; i < 11; i++) {
app += (char) block[i];
}
if (app.equals("NETSCAPE2.0")) {
readNetscapeExt();
} else
skip(); // don't care
break;
default: // uninteresting extension
skip();
}
break;
case 0x3b: // terminator
done = true;
break;
case 0x00: // bad byte, but keep going and see what happens
break;
default:
status = STATUS_FORMAT_ERROR;
}
}
}
/**
* Reads Graphics Control Extension values
*/
protected void readGraphicControlExt() {
read(); // block size
int packed = read(); // packed fields
dispose = (packed & 0x1c) >> 2; // disposal method
if (dispose == 0) {
dispose = 1; // elect to keep old image if discretionary
}
transparency = (packed & 1) != 0;
delay = readShort() * 10; // delay in milliseconds
transIndex = read(); // transparent color index
read(); // block terminator
}
/**
* Reads GIF file header information.
*/
protected void readHeader() {
String id = "";
for (int i = 0; i < 6; i++) {
id += (char) read();
}
if (!id.startsWith("GIF")) {
status = STATUS_FORMAT_ERROR;
return;
}
readLSD();
if (gctFlag && !err()) {
gct = readColorTable(gctSize);
bgColor = gct[bgIndex];
}
}
/**
* Reads next frame image
*/
protected void readImage() {
ix = readShort(); // (sub)image position & size
iy = readShort();
iw = readShort();
ih = readShort();
int packed = read();
lctFlag = (packed & 0x80) != 0; // 1 - local color table flag
interlace = (packed & 0x40) != 0; // 2 - interlace flag
// 3 - sort flag
// 4-5 - reserved
lctSize = 2 << (packed & 7); // 6-8 - local color table size
if (lctFlag) {
lct = readColorTable(lctSize); // read table
act = lct; // make local table active
} else {
act = gct; // make global table active
if (bgIndex == transIndex)
bgColor = 0;
}
int save = 0;
if (transparency) {
save = act[transIndex];
act[transIndex] = 0; // set transparent color if specified
}
if (act == null) {
status = STATUS_FORMAT_ERROR; // no color table defined
}
if (err())
return;
decodeImageData(); // decode pixel data
skip();
if (err())
return;
frameCount++;
// create new image to receive frame data
image = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB_PRE);
setPixels(); // transfer pixel data to image
frames.add(new GifFrame(image, delay)); // add image to frame list
if (transparency) {
act[transIndex] = save;
}
resetFrame();
}
/**
* Reads Logical Screen Descriptor
*/
protected void readLSD() {
// logical screen size
width = readShort();
height = readShort();
// packed fields
int packed = read();
gctFlag = (packed & 0x80) != 0; // 1 : global color table flag
// 2-4 : color resolution
// 5 : gct sort flag
gctSize = 2 << (packed & 7); // 6-8 : gct size
bgIndex = read(); // background color index
pixelAspect = read(); // pixel aspect ratio
}
/**
* Reads Netscape extension to obtain iteration count
*/
protected void readNetscapeExt() {
do {
readBlock();
if (block[0] == 1) {
// loop count sub-block
int b1 = ((int) block[1]) & 0xff;
int b2 = ((int) block[2]) & 0xff;
loopCount = (b2 << 8) | b1;
}
} while ((blockSize > 0) && !err());
}
/**
* Reads next 16-bit value, LSB first
*/
protected int readShort() {
// read 16-bit value, LSB first
return read() | (read() << 8);
}
/**
* Resets frame state for reading next image.
*/
protected void resetFrame() {
lastDispose = dispose;
lastRect = new Rectangle(ix, iy, iw, ih);
lastImage = image;
lastBgColor = bgColor;
// int dispose = 0;
// boolean transparency = false;
// int delay = 0;
lct = null;
}
/**
* Skips variable length blocks up to and including next zero length block.
*/
protected void skip() {
do {
readBlock();
} while ((blockSize > 0) && !err());
}
}
Diferenças do arquivo suprimidas por serem muito extensas Carregar Diff
+168
Ver Arquivo
@@ -0,0 +1,168 @@
/*
* GifAnimation is a processing library to play gif animations and to
* extract frames from a gif file. It can also export animated GIF animations
* This file class is under a GPL license. The Decoder used to open the
* gif files was written by Kevin Weiner. please see the separate copyright
* notice in the header of the GifDecoder / GifEncoder class.
*
* by extrapixel 2007
* http://extrapixel.ch
*
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package gifAnimation;
import java.awt.Color;
import java.awt.image.BufferedImage;
import processing.core.PApplet;
import processing.core.PConstants;
import processing.core.PImage;
public class GifMaker implements PConstants {
public final static int DISPOSE_NOTHING = 0;
public final static int DISPOSE_KEEP = 1;
public final static int DISPOSE_RESTORE_BACKGROUND = 2;
public final static int DISPOSE_REMOVE = 3;
private GifEncoder encoder;
private PApplet parent;
public GifMaker(PApplet parent, String filename) {
this.parent = parent;
parent.registerMethod("dispose", this);
encoder = initEncoder(filename);
}
public GifMaker(PApplet parent, String filename, int quality) {
this(parent, filename);
setQuality(quality);
}
public GifMaker(PApplet parent, String filename, int quality, int bgColor) {
this(parent, filename, quality);
setTransparent(bgColor);
}
/*
* finish stuff up when sketch is killed
*/
public void dispose() {
finish();
}
private GifEncoder initEncoder(String filename) {
GifEncoder returnEncoder = new GifEncoder();
returnEncoder.start(parent.savePath(filename));
return returnEncoder;
}
/*
* adds a delay to the last added frame int in milliseconds
*/
public void setDelay(int delay) {
encoder.setDelay(delay);
}
/*
* set the disposal mode for the last added frame
*
* from GIF specs: CODE MEANING 00 Nothing special 01 KEEP - retain the
* current image 02 RESTORE BACKGROUND - restore the background color 03
* REMOVE - remove the current image, and restore whatever image was beneath
* it.
*/
public void setDispose(int dispose) {
encoder.setDispose(dispose);
}
/**
* description taken from GifEncoder-class: Sets quality of color
* quantization (conversion of images to the maximum 256 colors allowed by
* the GIF specification). Lower values (minimum = 1) produce better colors,
* but slow processing significantly. 10 is the default, and produces good
* color mapping at reasonable speeds. Values greater than 20 do not yield
* significant improvements in speed.
*
* @param quality
* int greater than 0.
*/
public void setQuality(int quality) {
encoder.setQuality(quality);
}
/*
* sets the amount of times the animation should repeat
*
*/
public void setRepeat(int repeat) {
encoder.setRepeat(repeat);
}
/*
* sets the size of the GIF-file. if this method is not invoked, the size of
* the first added frame will be the image size.
*/
public void setSize(int width, int height) {
encoder.setSize(width, height);
}
/*
* Sets the transparent color. Every pixel with this color will be
* transparent in the output File
*/
public void setTransparent(int color) {
setTransparent((int) parent.red(color), (int) parent.green(color),
(int) parent.blue(color));
}
public void setTransparent(float red, float green, float blue) {
setTransparent((int) red, (int) green, (int) blue);
}
public void setTransparent(int red, int green, int blue) {
encoder.setTransparent(new Color(red, green, blue));
}
/*
* adds a frame to the current animation takes a PImage, or a pixel-array.
* if no parameter is passed, the currently displayed pixels in the sketch
* window is used.
*/
public void addFrame() {
parent.loadPixels();
addFrame(parent.pixels, parent.width, parent.height);
}
public void addFrame(PImage newImage) {
addFrame(newImage.pixels, newImage.width, newImage.height);
}
public void addFrame(int[] pixels, int width, int height) {
BufferedImage frame = new BufferedImage(width, height,
BufferedImage.TYPE_INT_ARGB);
frame.setRGB(0, 0, width, height, pixels, 0, width);
encoder.addFrame(frame);
}
/*
* finishes off the GIF-file and saves it to the given filename
* in the sketch directory. if the file already exists, it will
* be overridden!
*/
public boolean finish() {
return encoder.finish();
}
}