Let's consider the "issue 2" as "fix released" and continue this discussion on "issue 1" as you call it.
restrictions that I know of right now, is 4Gb of pixel data for TIFF files and 64k pixels per side for JPG.
How about if we make this a warning.
if (((height * width * estimate_for_bytes_per_pixel) > 2LL^32)) &&
(outputformat == TIFF)) {
..... WARNING: possibly generating more than 4Gb of pixel data. May not fit in output TIFF file.
}
if (((width > 65500) ||
(height > 65500)) &&
(outputformat == JPG)) {
..... WARNING: JPG format may not support the output image size.
}
Then it isn't as critical, and doesn't have to be 100% right. We can easily add checks for limits on other output formats as we go along.
Let's consider the "issue 2" as "fix released" and continue this discussion on "issue 1" as you call it.
restrictions that I know of right now, is 4Gb of pixel data for TIFF files and 64k pixels per side for JPG.
How about if we make this a warning.
if (((height * width * estimate_ for_bytes_ per_pixel) > 2LL^32)) &&
(outputformat == TIFF)) {
..... WARNING: possibly generating more than 4Gb of pixel data. May not fit in output TIFF file.
}
if (((width > 65500) ||
(height > 65500)) &&
(outputformat == JPG)) {
..... WARNING: JPG format may not support the output image size.
}
Then it isn't as critical, and doesn't have to be 100% right. We can easily add checks for limits on other output formats as we go along.