I have a big geotiff files that I try to split into small png images, using Java language, I cannot read all the picture into a BuffredImage, so I just want to read it and save it as 2 png pictures.
My question is How to split this big geotiff to 2 png or jpeg images and save theme on disk?
There's probably no pure-Java solution for splitting very large TIFF files into smaller ones. However, you could use an utility like tiffmakemosaic
from LargeTIFFTools for splitting the images. The utility comes with built-in functionality for converting the split images into JPEG format.
If you need your images as PNGs, you can use e.g. the ImageIO library as suggested in this thread.