The byte image change was only meant to cover 1-band images#7871
The byte image change was only meant to cover 1-band images#7871PaulWessel merged 2 commits intomasterfrom
Conversation
Need to ensure that the image has only one band and no indexed color. Closes #7827.
|
Wait, but now that I think on it, the error condition is a regression in itself. We used to allow indexed images without color maps and in that case it was attributed an automatic 0-255 one. |
|
Well, a 1-byte image without color index should work unless you give -C. no? |
|
Perhaps need more checks. We have this: But perhaps if no -C then byte_image_no_cmap should be false. |
|
Check this PR - works for ex52 and allows gray image. @joa-quim please check. |
|
I have not yet pulled this merged PR and see that this errors but shouldn't fail. It used to work because in those cases we provide a default color map. That is, this error check all together must be removed. Otherwise we are breaking previous behavior. The change was to allow -C, not to make it mandatory. |
|
Sure, that is why I added the check on -C. if no -C then should not get into that branch at all and instead paint gray. Please test it |
|
master has
So that is only true if 1 band, no index map, and -C is set. Your example has no -C so not updated. |
|
OK, but can't update right now. |
Need to ensure that the image has only one band and no indexed color. Closes #7827.