Yet another developer blog!

Again some technical tips, much already exist, but those are the ones I didn't find over the net. Feel free to take advantage of whatever content present on this page.

Sometimes it is necessary to rework height and width. One of my customer had for instance bad height and width information in images metadata (they were inverted compared to real data).

In the following method, height and width are exchanged:

  static BufferedImage flip(BufferedImage img) {...

Here is some code to convert a raw tiff image to a compressed one :

First remove the colors from the image

There are different ways to construct the target BufferedImage : with TYPE_BYTE_BINARY, we get a black and white image

        BufferedImage raw = File("src/main/resourc...