nackily / imglib Goto Github PK
View Code? Open in Web Editor NEWA lightweight image processing library of JAVA for simplifying development.
License: Apache License 2.0
A lightweight image processing library of JAVA for simplifying development.
License: Apache License 2.0
看了 Readme 之后, 对于什么时候需要自己引入第三方项目的依赖不太明白.
尽管 imglib 在某些图像处理能力上借助了这些优秀的第三方依赖,但 imglib 在打包后并未包含相关的依赖项。 如果有需要,您应该独立添加相应的依赖到项目中。
如果可以列出, 用户要使用哪些功能, 你应该引入哪个依赖, 会更清晰.
另外, 打包的时候是不是也可以把依赖项带上, 如果用户想自己引入依赖项, 可以通过 maven exclusions 来实现, 这样对于大多数用户来说就不必担心依赖的问题了.
[EN] You can list your expected features in the comment area or new issue, and the adopted features will be added to the planned features. Maybe in the next version, the new features you expect will be able to be implemented.
[ZH] 如果您有期望的特性,可以在评论区或者 issue 中告诉我,经采纳的建议特性将被加入到计划的功能特性中。也许在下个版本,就能实现您期待的新特性。
无法解析方法 'addFilter(HighQualityExpandHandler)
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
at java.awt.image.DataBufferInt.(DataBufferInt.java:75)
at java.awt.image.SinglePixelPackedSampleModel.createDataBuffer(SinglePixelPackedSampleModel.java:242)
at sun.awt.image.IntegerInterleavedRaster.(IntegerInterleavedRaster.java:73)
at sun.awt.image.IntegerInterleavedRaster.createCompatibleWritableRaster(IntegerInterleavedRaster.java:530)
at sun.awt.image.BufferedImageGraphicsConfig.createCompatibleImage(BufferedImageGraphicsConfig.java:102)
at java.awt.GraphicsConfiguration.createCompatibleImage(GraphicsConfiguration.java:178)
at cn.core.utils.BufferedImageUtils.newTransparentImage(BufferedImageUtils.java:67)
at cn.core.utils.BufferedImageUtils.newColoredImage(BufferedImageUtils.java:86)
at cn.core.utils.BufferedImageUtils.newBackgroundImage(BufferedImageUtils.java:46)
at cn.pipe.ypipe.merge.GridMergeHandler.merge(GridMergeHandler.java:79)
at cn.pipe.ypipe.AbstractMergeFilter.execute(AbstractMergeFilter.java:23)
at cn.usage.AbstractSourceBuilder.obtainBufferedImages(AbstractSourceBuilder.java:121)
at cn.usage.AbstractSourceBuilder.obtainBufferedImage(AbstractSourceBuilder.java:96)
at cn.usage.AbstractSourceBuilder.toFile(AbstractSourceBuilder.java:150)
at Demo.main(Demo.java:34)
1260张512*512的图片合并
使用最新版本依赖,
io.github.nackily
imglib-all
0.2.10
ImagePipes.ofEmptySource()
.register(new HashImageGenerator.Builder("Imglib") // hash 图像生成器
.gridVerticalNum(8) // 水平方向的点阵数量
.bgColor(ColorUtils.of(240, 240, 240)) // 背景色
.fgColor(ColorUtils.of(50, 150, 50))
.build())
.toThumbnails() // 转换为 Thumbnails
.addFilter(new HighQualityExpandHandler.Builder() // 图像无损放大处理器
.finalWidth(150) // 图像的宽度
.keepAspectRatio(true) // 保持长宽比例
.build())
.addFilter(new BorderHandler.Builder() // 边框处理器
.fillColor(ColorUtils.of(240, 240, 240)) // 边框填充色
.vMargins(15) // 垂直方向的边距
.hMargins(15) // 水平方向的边距
.alpha(1.0f) // 边框透明度
.build())
.scale(1.0)
.toFile(".../avatar.png");这段代码,编译失败,没有.addFilter方法
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.