Friday, September 7, 2012

Simple image processing with Java

Java has a rich set of libraries for manipulating images. I just use very basic features for the time being and I wanted to put a note here for the newcomers like me. To my understanding, Java uses a protocol when loading a resource (url = getClass().getResource(fileName)) and images "should" be considered as resources (ImageIO.read(url)). Of course there can be other ways of doing it but here is a summary to load resources to Java projects in Eclipse and a piece of code to play with images in Java:
1. http://stackoverflow.com/questions/8960381/runnable-jars-missing-buttons/9278270#9278270
2. http://www.coderanch.com/t/338329/GUI/java/draw-lines-without-change-background

Stay tuned ...