Git Product home page Git Product logo

image4j's People

Contributors

imcdonagh avatar sebkur avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

image4j's Issues

Debugging code in the trunk leaving images behind in tmpdir.

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.

How to change size?

I try call write like write(img, 32, new File("1.ico")),but the output ico is alway 128*128

License

Is your license LGPL v3 or LGPL v2?

ArrayIndexOutOfBoundsException

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.

Infinite loop in ICODecoder

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.