ImageMagick's "convert" command-line tool allows you to specify a limit on memory usage while performing its operations. I'd like to find a Java image-resizing library that gives the same option. My application sometimes gets very large JPEGs, and needs to downsample them to a reasonable size. For example, a 11600 x 5152 image will consume around 227MB of memory just decompressing it; the resizing process winds up using somewhat more than that.
Is there a way, in Java, to resize a very large image to a reasonable size without decompressing the entire image in memory?