java好用的GIF处理视频的库java库有哪些

频道本月排行
随机推荐文章
Copyright (C) 2006 - 2016 www.eorder.net.cn
All Rights Reserved谁知道有没有处理GIF的Java API?_百度知道
谁知道有没有处理GIF的Java API?
谁知道有没有处理GIF的Java API?
我有更好的答案
采纳率:41%
这两个链接里都有相关资料.源代码:API说明:上面的绝对没问题.
为您推荐:
其他类似问题
您可能关注的内容
java的相关知识
换一换
回答问题,赢新手礼包
个人、企业类
违法有害信息,请在下方选择后提交
色情、暴力
我们会通过消息、邮箱等方式尽快将举报结果通知您。>> gif89encoder!java的应用环境!
gif89encoder!java的应用环境!
所属分类:
下载地址:
Gif89Encoder090b.zip文件大小:103.10 kB
分享有礼! 》
请点击右侧的分享按钮,把本代码分享到各社交媒体。
通过您的分享链接访问Codeforge,每来2个新的IP,您将获得0.1 积分的奖励。
通过您的分享链接,每成功注册一个用户,该用户在Codeforge上所获得的每1个积分,您都将获得0.2 积分的分成奖励。
Gif89Encoder!
JAVA环境下应用!-Gif89Encoder! JAVA application environment!
Sponsored links
源码文件列表
温馨提示: 点击源码文件名可预览文件内容哦 ^_^
10.02 kB07-15-00 23:39
blue-ball-small.gif255.00 B12-18-98 02:47
blue-ball.gif925.00 B12-18-98 02:47
class-index.gif1.46 kB12-18-98 02:47
constructor-index.gif1.67 kB12-18-98 02:47
constructors.gif1.53 kB12-18-98 02:47
cyan-ball-small.gif255.00 B12-18-98 02:47
cyan-ball.gif925.00 B12-18-98 02:47
error-index.gif1.40 kB12-18-98 02:47
exception-index.gif1.67 kB12-18-98 02:47
green-ball-small.gif102.00 B12-18-98 02:47
green-ball.gif886.00 B12-18-98 02:47
interface-index.gif1.61 kB12-18-98 02:47
magenta-ball-small.gif104.00 B12-18-98 02:47
magenta-ball.gif896.00 B12-18-98 02:47
method-index.gif1.55 kB12-18-98 02:47
methods.gif1.37 kB12-18-98 02:47
OpenBookIcon.gif2.19 kB04-02-99 17:58
package-index.gif1.57 kB12-18-98 02:47
red-ball-small.gif255.00 B12-18-98 02:47
red-ball.gif527.00 B12-18-98 02:47
variable-index.gif1.54 kB12-18-98 02:47
variables.gif1.35 kB12-18-98 02:47
yellow-ball-small.gif255.00 B12-18-98 02:47
yellow-ball.gif925.00 B12-18-98 02:47
3.76 kB07-15-00 23:39
20.01 kB07-15-00 23:39
9.07 kB07-15-00 23:39
3.37 kB07-15-00 23:39
822.00 B07-15-00 23:39
530.00 B07-15-00 23:40
833.00 B07-15-00 23:39
classes.jar10.82 kB07-15-00 23:39
2.81 kB07-15-00 15:39
2.75 kB07-15-00 23:33
26.83 kB07-15-00 19:36
19.62 kB07-15-00 23:31
1.98 kB07-15-00 23:33
1.47 kB07-15-00 20:55
01.gif705.00 B07-14-00 16:49
02.gif703.00 B07-14-00 16:49
03.gif710.00 B07-14-00 16:49
04.gif708.00 B07-14-00 16:49
05.gif716.00 B07-14-00 16:49
06.gif710.00 B07-14-00 16:49
07.gif711.00 B07-14-00 16:49
08.gif712.00 B07-14-00 16:49
09.gif706.00 B07-14-00 16:49
10.gif705.00 B07-14-00 16:49
11.gif706.00 B07-14-00 16:49
12.gif707.00 B07-14-00 16:49
13.gif712.00 B07-14-00 16:49
14.gif707.00 B07-14-00 16:49
in.jpg24.87 kB07-15-00 16:41
110.00 B07-14-00 16:54
672.00 B07-11-00 14:57
(提交有效评论获得积分)
评论内容不能少于15个字,不要超出160个字。
评价成功,多谢!
下载Gif89Encoder090b.zip
CodeForge积分(原CF币)全新升级,功能更强大,使用更便捷,不仅可以用来下载海量源代码马上还可兑换精美小礼品了
您的积分不足,优惠套餐快速获取 30 积分
10积分 / ¥100
30积分 / ¥200原价 ¥300 元
100积分 / ¥500原价 ¥1000 元
订单支付完成后,积分将自动加入到您的账号。以下是优惠期的人民币价格,优惠期过后将恢复美元价格。
支付宝支付宝付款
微信钱包微信付款
更多付款方式:、
您本次下载所消耗的积分将转交上传作者。
同一源码,30天内重复下载,只扣除一次积分。
鲁ICP备号-3 runtime:Elapsed:293.066ms - init:0.1;find:0.9;t:0.6;tags:0.5;related:159.1;comment:0.3; 27.69
登录 CodeForge
还没有CodeForge账号?
Switch to the English version?
^_^"呃 ...
Sorry!这位大神很神秘,未开通博客呢,请浏览一下其他的吧爆笑Gif动画,看懂C++和Java的垃圾回收机制
· 2&年前 |
阅读(42235)·
评论()| 来源 itmmd.com
对C++的手动内存释放和Java的自动垃圾回收没概念?那就看看下面两个动画吧。
C++的手动垃圾回收Java的自动垃圾回收
来源: - 即时通讯开发者社区!
即时通讯框架hot
开源移动端即时通讯框架。
轻量级Web端即时通讯框架。
移动端实时音视频框架。
基于MobileIMSDK的IM系统。
本月热门资讯
12345678910
技术好文分类
最新社区主题
123456789101112131415
商务/合作:
投稿/报道:
手机访问本站
微信公众号new下次自动登录
现在的位置:
& 综合 & 正文
LZWEncoder.java源码(处理GIF图片)
import java.io.OutputS
import java.io.IOE
//==============================================================================
Adapted from Jef Poskanzer's Java port by way of J. M. G. Elliott.
K Weiner 12/00
class LZWEncoder {
private static final int EOF = -1;
private int imgW, imgH;
private byte[] pixA
private int initCodeS
private int curP
// GIFCOMPR.C
- GIF Image compression routines
// Lempel-Ziv compression based on 'compress'.
GIF modifications by
// David Rowley ()
// General DEFINEs
static final int BITS = 12;
static final int HSIZE = 5003; // 80% occupancy
// GIF Image compression - modified 'compress'
// Based on: compress.c - File compression ala IEEE Computer, June 1984.
// By Authors:
Spencer W. Thomas
(decvax!harpo!utah-cs!utah-gr!thomas)
(decvax!mcvax!jim)
Steve Davies
(decvax!vax135!petsd!peora!srd)
Ken Turkowski
(decvax!decwrl!turtlevax!ken)
James A. Woods
(decvax!ihnp4!ames!jaw)
(decvax!vax135!petsd!joe)
int n_ // number of bits/code
int maxbits = BITS; // user settable max # bits/code
// maximum code, given n_bits
int maxmaxcode = 1 && BITS; // should NEVER generate this code
int[] htab = new int[HSIZE];
int[] codetab = new int[HSIZE];
int hsize = HSIZE; // for dynamic table sizing
int free_ent = 0; // first unused entry
// block compression parameters -- after all codes are used up,
// and compression rate changes, start over.
boolean clear_flg =
// Algorithm:
use open addressing double hashing (no chaining) on the
// prefix code / next character combination.
We do a variant of Knuth's
// algorithm D (vol. 3, sec. 6.4) along with G. Knott's relatively-prime
// secondary probe.
Here, the modular division first probe is gives way
// to a faster exclusive-or manipulation.
Also do block compression with
// an adaptive reset, whereby the code table is cleared when the compression
// ratio decreases, but after the table fills.
The variable-length output
// codes are re-sized at this point, and a special CLEAR code is generated
// for the decompressor.
Late addition:
construct the table according to
// file size for noticeable speed improvement on small files.
Please direct
// questions about this implementation to ames!jaw.
int g_init_
int ClearC
// Output the given code.
// Inputs:
A n_bits-bit integer.
If == -1, then EOF.
This assumes
that n_bits =& wordsize - 1.
// Outputs:
Outputs code to the file.
// Assumptions:
Chars are 8 bits long.
// Algorithm:
Maintain a BITS character long buffer (so that 8 codes will
// fit in it exactly).
Use the VAX insv instruction to insert each
// code in turn.
When the buffer fills up empty it and start over.
int cur_accum = 0;
int cur_bits = 0;
int masks[] =
// Number of characters so far in this 'packet'
// Define the storage for the packet accumulator
byte[] accum = new byte[256];
//----------------------------------------------------------------------------
LZWEncoder(int width, int height, byte[] pixels, int color_depth) {
initCodeSize = Math.max(2, color_depth);
// Add a character to the end of the current packet, and if it is 254
// characters, flush the packet to disk.
void char_out(byte c, OutputStream outs) throws IOException {
accum[a_count++] =
if (a_count &= 254)
flush_char(outs);
// Clear out the hash table
// table clear for block compress
void cl_block(OutputStream outs) throws IOException {
cl_hash(hsize);
free_ent = ClearCode + 2;
clear_flg =
output(ClearCode, outs);
// reset code table
void cl_hash(int hsize) {
for (int i = 0; i & ++i)
htab[i] = -1;
void compress(int init_bits, OutputStream outs) throws IOException {
int i /* = 0 */;
int hsize_
// Set up the globals:
g_init_bits - initial number of bits
g_init_bits = init_
// Set up the necessary values
clear_flg =
n_bits = g_init_
maxcode = MAXCODE(n_bits);
ClearCode = 1 && (init_bits - 1);
EOFCode = ClearCode + 1;
free_ent = ClearCode + 2;
a_count = 0; // clear packet
ent = nextPixel();
hshift = 0;
for (fcode = fcode & 65536; fcode *= 2)
hshift = 8 - // set hash code range bound
hsize_reg =
cl_hash(hsize_reg); // clear hash table
output(ClearCode, outs);
outer_loop : while ((c = nextPixel()) != EOF) {
fcode = (c && maxbits) +
i = (c && hshift) ^ // xor hashing
if (htab[i] == fcode) {
ent = codetab[i];
} else if (htab[i] &= 0) // non-empty slot
disp = hsize_reg - // secondary hash (after G. Knott)
if (i == 0)
if ((i -= disp) & 0)
i += hsize_
if (htab[i] == fcode) {
ent = codetab[i];
continue outer_
} while (htab[i] &= 0);
output(ent, outs);
if (free_ent & maxmaxcode) {
codetab[i] = free_ent++; // code -& hashtable
cl_block(outs);
// Put out the final code.
output(ent, outs);
output(EOFCode, outs);
//----------------------------------------------------------------------------
void encode(OutputStream os) throws IOException {
os.write(initCodeSize); // write "initial code size" byte
remaining = imgW * imgH; // reset navigation variables
curPixel = 0;
compress(initCodeSize + 1, os); // compress and write the pixel data
os.write(0); // write block terminator
// Flush the packet to disk, and reset the accumulator
void flush_char(OutputStream outs) throws IOException {
if (a_count & 0) {
outs.write(a_count);
outs.write(accum, 0, a_count);
a_count = 0;
final int MAXCODE(int n_bits) {
return (1 && n_bits) - 1;
//----------------------------------------------------------------------------
// Return the next pixel from the image
//----------------------------------------------------------------------------
private int nextPixel() {
if (remaining == 0)
return EOF;
byte pix = pixAry[curPixel++];
return pix & 0
void output(int code, OutputStream outs) throws IOException {
cur_accum &= masks[cur_bits];
if (cur_bits & 0)
cur_accum |= (code && cur_bits);
cur_accum =
cur_bits += n_
while (cur_bits &= 8) {
char_out((byte) (cur_accum & 0xff), outs);
cur_accum &&= 8;
cur_bits -= 8;
// If the next entry is going to be too big for the code size,
// then increase it, if possible.
if (free_ent & maxcode || clear_flg) {
if (clear_flg) {
maxcode = MAXCODE(n_bits = g_init_bits);
clear_flg =
if (n_bits == maxbits)
maxcode = MAXCODE(n_bits);
if (code == EOFCode) {
// At EOF, write the rest of the buffer.
while (cur_bits & 0) {
char_out((byte) (cur_accum & 0xff), outs);
cur_accum &&= 8;
cur_bits -= 8;
flush_char(outs);
【上篇】【下篇】}

我要回帖

更多关于 处理视频的库java 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信