posted 11 years ago
JPEG compresses images well. But in memory, a BufferedImage generally needs 4 bytes for each pixel just for the raw data, so that would be 6480 * 4320 * 4 = 112 MB, regardless of how big the file is.
With a 1024MB heap, that should still fit, though, unless there's tons of other stuff that can't be GC-ed. What's the command you use to start the JVM? Post all the options.
Have you tried allocating 2GB instead of 1GB?