You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When Encode sets up the output writer dst for the selected compression it only looks for cNone and cDeflate. Any other choice leads to dst being left nil which means when the encode* functions to to write to it they panic. https://github.com/golang/image/blob/master/tiff/writer.go#L317
Seems best if Encode returned an error in the case of an unsupported compression.
The text was updated successfully, but these errors were encountered:
I see that there's a CL (https://go-review.googlesource.com/c/image/+/183224) for adding encoding support in image/ccitt which I assume will also tie into image/tiff so I'll close this since it'll be solved by that. Sorry for the noise.
What version of Go are you using (
go version
)?go version go1.13.3 darwin/amd64
Does this issue reproduce with the latest release?
Yes, latest master of x/image
What operating system and processor architecture are you using (
go env
)?Darwin/amd64
What did you do?
What did you expect to see?
TIFF written using CCITTGroup4 compression (or optionally an error if compression isn't support for encode).
What did you see instead?
Panic
When Encode sets up the output writer
dst
for the selected compression it only looks forcNone
andcDeflate
. Any other choice leads todst
being leftnil
which means when theencode*
functions to to write to it they panic. https://github.com/golang/image/blob/master/tiff/writer.go#L317Seems best if Encode returned an error in the case of an unsupported compression.
The text was updated successfully, but these errors were encountered: