发布GIF4J破解版
2年前,我提供了一个GIF4J的可用版,GIF4J是一套针对gif操作的Java类库。
周末无聊,最终破解了Gif4J的"Eval Gif4j"。
import java.awt. * ;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
public class GifImageWatermarkExample {
// Usage: java GifImageWatermarkExample [PathToGifImageToWatermark] (please be sure that the gif4j jar is in your CLASSPATH)
// By default the gif4j_logotype.gif as an example gif image is used
public static void main(String[] args) {
File gifImageFileToWatermark = null ;
if (args.length == 0 ) {
gifImageFileToWatermark = new File( " test.gif " );
} else
gifImageFileToWatermark = new File(args[ 0 ]);
// load and decode gif image
GifImage gifImage = null ;
try {
gifImage = GifDecoder.decode(gifImageFileToWatermark);
} catch (IOException e) {
e.printStackTrace();
System.exit( 1 );
}
// change out directory if it is necessary
File outputDir = new File( " . " + File.separator + " result " );
if ( ! outputDir.exists())
outputDir.mkdirs();
// create watermark image using TextPainter
TextPainter painter = new TextPainter( new Font( " Verdana " , Font.BOLD, 10 ));
painter.setOutlinePaint(Color.WHITE);
BufferedImage watermarkImage = painter.renderString( " david.turing " , true );
// create watermark
Watermark watermark = new Watermark(watermarkImage, Watermark.LAYOUT_TOP_LEFT, 0.2f );
// apply watermark
GifImage topLeftWatermarked = watermark.apply(gifImage, true );
// apply watermark smoothly
GifImage topLeftWatermarked_smoothly = watermark.apply(gifImage, true );
// change the watermark alignment
watermark.setLayoutConstraint(Watermark.LAYOUT_MIDDLE_CENTER);
// apply watermark
GifImage middleCenterWatermarked = watermark.apply(gifImage, false );
// apply watermark smoothly
GifImage middleCenterWatermarked_smoothly = watermark.apply(gifImage, true );
// change the watermark alignment
watermark.setLayoutConstraint(Watermark.LAYOUT_BOTTOM_RIGHT);
// apply watermark
GifImage bottomRightWatermarked = watermark.apply(gifImage, false );
// apply watermark smoothly
GifImage bottomRightWatermarked_smoothly = watermark.apply(gifImage, true );
// change the watermark alignment
watermark.setLayoutConstraint(Watermark.LAYOUT_COVER_CONSECUTIVELY);
// change the watermark transparency
watermark.setTransparency( 0.20f );
// apply watermark
GifImage coverConsWatermarked = watermark.apply(gifImage, false );
// apply watermark smoothly
GifImage coverConsWatermarked_smoothly = watermark.apply(gifImage, true );
// Save the results
try {
GifEncoder.encode(topLeftWatermarked, new File(outputDir, " topLeftWatermarked.gif " ));
GifEncoder.encode(topLeftWatermarked_smoothly, new File(outputDir, " topLeftWatermarked_smooth.gif " ));
GifEncoder.encode(middleCenterWatermarked, new File(outputDir, " middleCenterWatermarked.gif " ));
GifEncoder.encode(middleCenterWatermarked_smoothly, new File(outputDir, " middleCenterWatermarked_smooth.gif " ));
GifEncoder.encode(bottomRightWatermarked, new File(outputDir, " bottomRightWatermarked.gif " ));
GifEncoder.encode(bottomRightWatermarked_smoothly, new File(outputDir, " bottomRightWatermarked_smooth.gif " ));
GifEncoder.encode(coverConsWatermarked, new File(outputDir, " coverConsWatermarked.gif " ));
GifEncoder.encode(coverConsWatermarked_smoothly, new File(outputDir, " coverConsWatermarked_smooth.gif " ));
} catch (IOException e) {
e.printStackTrace();
}
}
}
下面是运行的结果:
破解的包放在我的UserGroup下载:
http://dev2dev.bea.com.cn/bbs/thread.jspa?forumID=29304&threadID=36395&messageID=214504
发布GIF4J破解版相关推荐
- iphone如何信任软件_苹果企业开发者证书成漏洞 盗版商发布破解版iPhone应用
盗版商滥用苹果企业开发者证书 北京时间2月14日消息,路透社发现,软件盗版商劫持了苹果公司开发的技术,在iPhone上发布破解版Spotify.<愤怒的小鸟>.<口袋妖怪GO> ...
- 华为发布国行版P40系列,售价4188元起;大疆回应“至少50%的裁员清扫计划”;Firefox 75发布 | 极客头条...
整理 | 屠敏 头图 | CSDN 下载自东方 IC 快来收听极客头条音频版吧,智能播报由标贝科技提供技术支持. 「极客头条」-- 技术人员的新闻圈! CSDN 的读者朋友们早上好哇,「极客头条」来啦 ...
- Photoshop CS6 MAC 中文版破解版 支持Retina屏
Photoshop CS6 MAC 中文版破解版 支持Retina屏 目前世界上"最好的化妆品"是一款叫做PhotoShop的产品,它可以帮你去除所有你不满意的地方.上周末,这款最 ...
- CorelCAD 2018 for Mac中文破解版永久激活方法
CorelCAD 2018 for Mac中文破解版终于上线了,CorelCAD 2018是一款Mac上功能强大的CAD软件,可以将二维设计转换为三维实景. corelcad 2018 mac提供卓越 ...
- Navicat Premium 12 for Mac(多重连接数据库管理工具)汉化破解版
本站第一时间为各位小伙伴带来最好的数据库管理工具Navicat Premium Mac全新汉化激活版!Navicat Premium for mac是一个可多重连接的数据库管理工具,Navicat的功 ...
- dreamweaver cs6 mac 破解版
Dreamweaver CS6 Mac破解版 介于之前小子分享的Mac版的Adobe的PS CS6和Illustrator CS6,有用户要求小子分享下Dreamweaver,小子当然乐意效劳. Dr ...
- Affinity Designer Mac破解版中文永久激活方法
一款可以与adobe ai cc抗衡的软件,Affinity Designer for Mac目前已发布更新.小编第一时间为大家带来affinity designer mac 中文破解版,此版本已经为 ...
- 太乐地图下载器 V5.0.5 破解版
博主今天给大家带来太乐地图下载器 V5.0.5 破解版 需要的小伙伴下载使用哦:http://download.csdn.net/download/shujujiegougou/9514304?utm ...
- Wirecast Pro 11 Mac(直播软件) v11.0.0中文破解版
Wirecast 11 Pro Mac中文破解版是一款绝佳的专业直播软件.Wirecast 11 Pro可以让您只使用一个摄像头,使用互联网连接和计算机做到专业水准的现场直播.创建或录制网络节目,广播 ...
最新文章
- C++实现大数的加法
- python pip-python之pip的使用
- POJ3692 最大点权独立集元素个数
- 7.Redis常用命令:ZSet
- Spring Boot注解完成Restful API
- 变量的比较之equals 与 == 的区别
- Ubuntu Eclipse ns3编译中 遇到的OSError 系列问题
- android录音播放并上传
- allt什么意思_Allt是什么意思
- android上传文件用哪个布局,每周总结20130821——android控件的尺寸、http文件上传...
- 第7章 PCA与梯度上升法 学习笔记下
- Fortran 95简单教程(
- 莫贝克固态V602 120G SM2258XT存储颗粒无型号开卡过程
- C语言(静态链接库和动态链接库)
- VM未能关闭虚拟机电源
- 两直线平行交叉相乘_高中数学知识点:向量平行公式和垂直公式
- 待得天晴花已老,不如携手雨中看
- b、B、KB、MB、GB 的关系
- Codeforces Round #672 (Div. 2) Pokémon Army
- adb devices后显示List of devices attached/unauthorized问题解决