Open petervwyatt opened 3 years ago
More:
More:
Also Table 8: Columns (positive)?
It doesn't make any sense to allow a value of 0 here, does it? FWIW, I'll come out to admit that I managed to produce a segfault if 0 was given.
Similarly for the Columns entry in Table 11 (you wrote non-negative above)?
Re Columns in Tables 8 and 11 possibly being zero: I was half thinking about the highly degenerate corner case situation where there is no data in the compressed images, in which case Columns being zero might be equally pointless/degenerate. But if we assume images always have at least 1 pixel then yes, Columns would be strictly greater than zero.
How many rows of width zero does a zero-pixel image have? Allowing Columns = 0 begs the age-old question of what is 0 divided by 0.
However, a zero-pixel image with Columns any positive integer is perfectly possible. It simply has 0 rows of that size.
(I'm assuming this data is always stored in row-major order... is it?)
Yes - I believe these compressors require row-major order. As I said I only half thought about it 😀... so maybe Columns should be defined to always be strictly greater than zero.
BTW based on a recent PDF TWG discussion, we will switch to avoid the use of terms such as "positive", "negative" or "non-negative" because of regional differences of interpretation as to whether each of these includes or excludes zero. We'll go with explicit wording w.r.t to zero.
More:
More:
Several integer keys in dictionaries do not state any explicit valid ranges, such as "positive integer ..." or "non-negative integer ...".
One way to fix this quickly may be to simply state once up the front of ISO 32K somewhere (where?) that key values that represent counts, sizes, widths, heights, file byte offsets, object numbers, page numbers and <anything else that is common?> are non-negative unless stated otherwise.
Or we could review each and add the explicit wording in place.
Here is an incomplete list (from a search of ISO 32000-2 for "integer" up to about Table 100 - more to be added later):