Unable to export flat image

I am working with montaged TEM images, and attempting to use TrakEM2’s Export> Make flat image function to generate a single file. When I do so, I get the following error: Can’t use ‘quality’ flag for getFlatAWTImage: would be too large.
I can generate a file if I leave the “Best quality” box unchecked, but the resolution is too low for it to be any use and the entire image becomes a flat blue box after a few seconds if I open it in Preview.


I’m using an iMac running macOS Mojave with these specs:
iMac (Retina 4K, 21.5-inch, 2019)
Processor: 3.2 GHz Intel Core i7
Memory: 32 GB 2667 MHz DDR4
Graphics: Radeon Pro Vega 20 4 GB
The flat image I want to make would be made 128 tif files that are each 3.2 MB. Is it possible I just need to adjust some settings, or is this impossible on my current hardware?

1 Like

Hi @etozment,

Probably not be a issue with your system, but it sounds like youve run into a limitation of array size in java. A single image can not have more than about 2billion pixels (see below).

Maybe we can help find a workaround, what would you like to use the flat image for?

John

It’s really just for the sake of convenience so I can share my data with other people in the lab as a single file without having to send them the entire directory the project is housed in with all of the component images.

The images I’m using are a little under 1800x1800 pixels. Even with 128 of them, that should be under the 2 GP limit. Does anyone have any ideas of what I could try to get this to work?

@bogovicj,

My apologies, I didn’t think to try mentioning you. But yes, I want to use the flat image to share my data with other people in my lab without having to send them an entire directory with each of the individual image files in it. It should fall under the ~2GP limit.