Return a zero width or zero height image of the appropriate type.
Fixesgolang/go#10393.
Change-Id: I3aa7b6125447726600fb072ce1e8682373ce2a57
Reviewed-on: https://go-review.googlesource.com/9182
Reviewed-by: Nigel Tao <nigeltao@golang.org>
The blue-purple-pink.lzwcompressed.tiff image was created by
"bmp2tiff -c lzw".
LGTM=djd
R=djd
CC=bsiegert, golang-codereviews
https://golang.org/cl/105750045
no_compress.tiff is no_rps.tiff that was read in by go.image/tiff and written out again (with a hack to avoid creating the Compression tag on the way out).
$ tiffdump no_compress.tiff
no_compress.tiff:
Magic: 0x4949 <little-endian> Version: 0x2a
Directory 0: offset 968 (0x3c8) next 0 (0)
ImageWidth (256) SHORT (3) 1<16>
ImageLength (257) SHORT (3) 1<15>
BitsPerSample (258) SHORT (3) 4<8 8 8 8>
Photometric (262) SHORT (3) 1<2>
StripOffsets (273) LONG (4) 1<8>
SamplesPerPixel (277) SHORT (3) 1<4>
RowsPerStrip (278) SHORT (3) 1<15>
StripByteCounts (279) LONG (4) 1<960>
XResolution (282) RATIONAL (5) 1<72>
YResolution (283) RATIONAL (5) 1<72>
ResolutionUnit (296) SHORT (3) 1<2>
ExtraSamples (338) SHORT (3) 1<2>
LGTM=bsiegert, nigeltao
R=bsiegert, nigeltao
CC=golang-codereviews
https://golang.org/cl/95930044
Performance for an RGBA image:
benchmark old ns/op new ns/op delta
BenchmarkEncode 1633495 7897 -99.52%
benchmark old MB/s new MB/s speedup
BenchmarkEncode 37.83 7824.96 206.85x
NRGBA images are now encoded as such, the spec calls it
"unassociated alpha".
R=nigeltao, rsc
CC=golang-dev
https://golang.org/cl/6308049
Manual edits to README.
Moved from main Go repository, deleted Makefiles.
Tested with go test code.google.com/p/go.image/...
Fixesgolang/go#2797.
R=rsc, rsc, r
CC=golang-dev
https://golang.org/cl/5593053