Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/image/tiff: invalid format: wrong number of samples for RGB #11413

Open
noblehng opened this issue Jun 26, 2015 · 1 comment
Open

x/image/tiff: invalid format: wrong number of samples for RGB #11413

noblehng opened this issue Jun 26, 2015 · 1 comment
Milestone

Comments

@noblehng
Copy link

This tiff file can't be decoded using "golang.org/x/image/tiff". It give out following error message:

tiff: invalid format: wrong number of samples for RGB

Test program:

package main

import (
        "bytes"
        "io/ioutil"
        "os"

        "golang.org/x/image/tiff"
)

func main() {
        data, _ := ioutil.ReadFile(os.Args[1])
        _, err := tiff.Decode(bytes.NewReader(data))
        if err != nil {
                println(err.Error())
        }   
}

Use cgo binding to libtiff decode this file without problem.

go version

go version go1.4.2 linux/amd64

tiffinfo

TIFF Directory at offset 0x83d68 (540008)
  Image Width: 300 Image Length: 450
  Bits/Sample: 8
  Sample Format: unsigned integer
  Compression Scheme: None
  Photometric Interpretation: RGB color
  Samples/Pixel: 4
  Rows/Strip: 1
  Planar Configuration: separate image planes
@ianlancetaylor ianlancetaylor added this to the Unreleased milestone Jul 11, 2015
@ianlancetaylor
Copy link
Contributor

CC @nigeltao

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants