Skip to content
Permalink
Browse files

Fix #75, #76

  • Loading branch information...
hhrutter committed Apr 13, 2019
1 parent 40f60a0 commit 14e74ba2c2ebe2ade2aa4c8506c5e9cec2a5fbd8
Showing with 9 additions and 3 deletions.
  1. +7 −2 ccitt/reader.go
  2. +2 −1 tiff/reader.go
@@ -576,8 +576,13 @@ func (d *decoder) decodeGroup4() {

mode, err := d.nextMode()
if err != nil {
d.err = err
return
// Check for aligned 3 bytes eofb.
d.align = true
mode, err = d.nextMode()
if err != nil {
d.err = err
return
}
}

for k, v := range map[string]func(){
@@ -463,7 +463,8 @@ func newDecoder(r io.Reader) (*decoder, error) {
d.config.Height = int(d.firstVal(tImageLength))

if _, ok := d.features[tBitsPerSample]; !ok {
return nil, FormatError("BitsPerSample tag missing")
// Default is 1 per specification.
d.features[tBitsPerSample] = []uint{1}
}
d.bpp = d.firstVal(tBitsPerSample)
switch d.bpp {

0 comments on commit 14e74ba

Please sign in to comment.
You can’t perform that action at this time.