1
0
mirror of https://github.com/golang/go synced 2024-11-19 15:54:46 -07:00
go/src/image
Jed Denlea c52aca1c76 image/gif: fix writeImageBlock with SubImages
If an image has been cropped horizontally, writeImageBlock detects that
its width and Stride differ and acts accordingly.

However, if an image has been cropped vertically, trimming from the
bottom, the whole original image will be written in place.  This results
in more data in the LZW stream than necessary, and many decoders
including image/gif's itself will fail to load.

Fixes #20692

Change-Id: Id332877e31bcf3729c89d8a50c1be0464028d82e
Reviewed-on: https://go-review.googlesource.com/45972
Run-TryBot: Emmanuel Odeke <emm.odeke@gmail.com>
Run-TryBot: Nigel Tao <nigeltao@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Nigel Tao <nigeltao@golang.org>
2017-06-16 05:45:48 +00:00
..
color image/color: tweak the YCbCr to RGBA conversion formula again. 2017-02-10 22:57:50 +00:00
draw
gif image/gif: fix writeImageBlock with SubImages 2017-06-16 05:45:48 +00:00
internal/imageutil image/color: tweak the YCbCr to RGBA conversion formula again. 2017-02-10 22:57:50 +00:00
jpeg image/jpeg: fix extended sequential Huffman table selector (Th). 2017-04-27 03:48:40 +00:00
png image/png: decode Gray8 transparent images. 2017-03-17 07:50:05 +00:00
testdata
decode_example_test.go
decode_test.go
format.go
geom_test.go image: fix the overlap check in Rectangle.Intersect. 2017-02-10 05:05:59 +00:00
geom.go image: fix the overlap check in Rectangle.Intersect. 2017-02-10 05:05:59 +00:00
image_test.go all: remove some unused parameters in test code 2017-04-25 14:38:10 +00:00
image.go
names.go
ycbcr_test.go
ycbcr.go