imcdonagh / image4j Goto Github PK
View Code? Open in Web Editor NEWThe image4j library allows you to read and write certain image formats in 100% pure Java.
License: Other
The image4j library allows you to read and write certain image formats in 100% pure Java.
License: Other
https://mvnrepository.com/artifact/net.sf.image4j/image4j/0.7zensight1 has a version that it indexed from https://clojars.org/repo/net/sf/image4j/image4j/0.7zensight1/
Please commit the latest 0.7.2.
Normally I would never submit a bug report for debugging code in the trunk, but as the codebase hasn't changed for a year, I want to put this out there as a reminder.
In codec/ico/ICODecoder.java
around lines 200 and 330 are two tiny (essentially identical) blocks of code which write out the current image data to a temporary file, as an aid to debugging. The first block of code is commented out. The second block, however, is not. Be aware that if you drop the current source into your project as-is that image files will begin appearing in java.io.tmpdir
. They are not automatically deleted at program exit (obviously, because that would defeat the purpose of writing them in the first place).
My advice to new users is to comment out the tmpfile code at about line 330 or so.
I try call write like write(img, 32, new File("1.ico")),but the output ico is alway 128*128
Is your license LGPL v3 or LGPL v2?
I got a issue 'java.lang.ArrayIndexOutOfBoundsException'.
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 12
at net.sf.image4j.codec.bmp.BMPEncoder.write4(BMPEncoder.java:365)
at net.sf.image4j.codec.bmp.BMPEncoder.write(BMPEncoder.java:132)
at net.sf.image4j.codec.bmp.BMPEncoder.write(BMPEncoder.java:39)
at Test.main(Test.java:13)
If you want to replay the crash. You can got more details from https://github.com/WayneDevMaze/afl_test_works/tree/master/image4j/crash_example.
Hello. I have found an infinite loop if i try to decode ICO image from ByteArrayInputStream. When I put file in FileInputStream it is ok.
final File file = new File("/tmp/logo.ico");
final FileInputStream is = new FileInputStream(file);
List<BufferedImage> imageContainer = ICODecoder.read(is);
But when I try to decode image from ByteArrayInputStream in stucks in loop at net.sf.image4j.codec.ico.ICODecoder.readExt(ICODecoder.java:155).
final File file = new File("/tmp/logo.ico");
final FileInputStream fileInputStream = new FileInputStream(file);
final byte[] byteArray = IOUtils.toByteArray(fileInputStream);
final ByteArrayInputStream is = new ByteArrayInputStream(byteArray);
List<BufferedImage> imageContainer = ICODecoder.read(is);
Here is ICO file:
https://mega.nz/#!ZwYzBKYC!O6Y4_jQH7SyYin2e5UYB-GIwxU2IShb0ylkOjUdUbIQ
Any plans to cut another release?
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.