I want to write a tiff image in Java which has 7 bands. My workflow looks as follows: I load a geotiff file, than, I select some 5pixel x 5pixel windows in the image and want to save them as a normal tiff image; the spatial information of the geotiff is not needed anymore. Now this worked fine until I noticed that of the 7 bands which were originally provided, just 3 bands remained in my output tiff images (5pixel x 5pixel each). I think the reason is that I have to define a type for the BufferedImage which in my case is RGB (BufferedImage.TYPE_INT_RGB). Is there a solution someone can suggest in order that I have output images with 7 bands, not 3?
Thank you very much for your help!
Best regards, Marvin