。
alibaba / simpleimage Goto Github PK
View Code? Open in Web Editor NEWLicense: Apache License 2.0
License: Apache License 2.0
从https://mvnrepository.com/artifact/com.alibaba/simpleimage/1.2.3导入pom依赖,编译时报错,提示Exception in thread "main" java.lang.NoClassDefFoundError: javax/media/jai/PlanarImage,然后找不到这个jar包,maven仓库找不到这个jar包。各种报错,有谁导入pom文件成功的吗?
As mentioned as title, should add:
compile 'javax.media:jai_core:1.1.3'
compile 'com.sun.media:jai_codec:1.1.2_01'
in gradle file or do the same thing when u used maven
This bug exists in Linux platform but not exists in Mac OSX platform
I suggest alibaba team add those two dependencies in the maven dependencies section
好多不知道怎么用,请问有详尽的文档吗,还有就时我在maven库上链接的主页好像已经失效了http://code.alibabatech.com/wiki/display/SIMPLEIMAGE/Overview
Hi, great efforts with support for images so it is with the API shared in alibaba.
As you know Thumbnails also provides us the similar function as simpleImage describes,
so how about some performance test for comparison and more choices for us .
使用ScaleParameter对图片进行缩放,缩小是正常的..但是无法放大.请问下是什么原因
WriteParameter wp = new WriteParameter();
wp.setDefaultQuality(level);
ScaleParameter sp = new ScaleParameter(width, height, ScaleParameter.Algorithm.LANCZOS);
ImageRender ir = new ReadRender(bis, true);
ImageRender sc = new ScaleRender(ir, sp);
wr = new WriteRender(sc, bos, ImageFormat.getImageFormat(FilenameUtils.getExtension(outFile.getName())), wp);
wr.render();
比如图片 750 * 670 ,我要750*750的,根据这个new ScaleParameter(750, 750)类的设置, 最后得到的图片还是,750 * 670 而我想要的是,670 * 670 这样
1 required artifact is missing.
for artifact:
com.alibaba:pampas:pom:4
不知道到哪里去下载 com.alibaba:pampas
param = new WatermarkParameter(waterWrapper, 1f, imageWrapper.getWidth() / 16, imageWrapper.getWidth() / 16);
如何解决
png转换成jpg格式,背景出现问题,不知道有没有转换格式的列子
哪里可以下载1.2.4的jar包,网上都是1.2.3的jar包,下载了1.2.4版本的源码打包不了,求1.2.4版本的jar包,谢谢~
Please add some information about the project, it would be wonderful if you also put a code snippet and to License.
Hi, guys
I can find the latest version is 1.2.3 in the maven responsitory, but the lastest version is 1.2.4 in github source code. pls submit the latest version to maven responsitory. thks!
这个我是测试给图片添加文字水印的时候测试发现的 ,空指针,原因是创建FootnoteDrawTextItem对象时没有指定字体,而源码使用的是默认字体FontManager.getFont("方正黑体"); 这个返回的是空,又去看了FontManager源码,发现cache这个没有是个空map 然后有个 静态块,感觉是这里加载的,但是没有写实现
大概看了下FontManager这块的源码,
com.alibaba.simpleimage.SimpleImageException: java.lang.NullPointerException
at com.alibaba.simpleimage.render.WriteRender.render(WriteRender.java:218)
at com.mljr.carrier.test.SimpleImageDemo.doDrawImageText(SimpleImageDemo.java:326)
at com.mljr.carrier.test.SimpleImageDemo.testFootnoteDrawTextItem(SimpleImageDemo.java:291)
at com.mljr.carrier.test.SimpleImageDemo.main(SimpleImageDemo.java:297)
Caused by: java.lang.NullPointerException
at com.alibaba.simpleimage.render.FootnoteDrawTextItem.drawText(FootnoteDrawTextItem.java:110)
at com.alibaba.simpleimage.util.ImageDrawHelper.drawText(ImageDrawHelper.java:54)
at com.alibaba.simpleimage.render.DrawTextRender.render(DrawTextRender.java:80)
at com.alibaba.simpleimage.render.WriteRender.render(WriteRender.java:213)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.