2017.09.16 22:41 "Re: [Tiff] TIFF tile size limit", by Roger Leigh
On 16/09/2017 19:50, Bob Friesenhahn wrote:
Does anyone have an opinion on the maximum tile size which should be allowed by a general purpose TIFF reader?
For example is 4096x4096 large enough to handle any practical TIFFs?
I'd venture to say any size up to and including the full image size.
There's no real upper limit for writing that I can see. We already have 4k x 4k CCDs in widespread use; 8k x 8k are now available. I could write out the data in whatever size the acquisition hardware provides so 8k x 8k is a reality today and it's only going to get bigger. Writing out the data in smaller tiles has a (small) cost in rearranging the data by copying to a tile buffer I might not want to pay during acquisition. That cost increases with image size.
For reading there are a few tradeoffs. We need the tiles to be big enough that we don't do lots of separate reads since this is costly, but small enough that we don't waste disc bandwidth and memory by reading data we will not use. It's often also helpful if it's in a size which the graphics/compute hardware can cope with or else we need to further split it if too big or coalesce if too small. This will vary wildly depending upon the application and the hardware. OpenGL can have a low limit, but CUDA and OpenCL can be much larger--8k x 8k is the smallest allowed max size for OpenCL: see https://www.khronos.org/registry/OpenCL/sdk/1.0/docs/man/xhtml/clGetDeviceInfo.html (CL_DEVICE_IMAGE2D_MAX_HEIGHT/WIDTH). So I think it's fair to say that a practical TIFF reader should be capable of at least 8k x 8k for today's basic needs, and likely significantly more to be future proof.