• Jed Denlea's avatar
    image/gif: fix writeImageBlock with SubImages · c52aca1c
    Jed Denlea authored
    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: 's avatarNigel Tao <nigeltao@golang.org>
    c52aca1c
Name
Last commit
Last update
..
color Loading commit data...
draw Loading commit data...
gif Loading commit data...
internal/imageutil Loading commit data...
jpeg Loading commit data...
png Loading commit data...
testdata Loading commit data...
decode_example_test.go Loading commit data...
decode_test.go Loading commit data...
format.go Loading commit data...
geom.go Loading commit data...
geom_test.go Loading commit data...
image.go Loading commit data...
image_test.go Loading commit data...
names.go Loading commit data...
ycbcr.go Loading commit data...
ycbcr_test.go Loading commit data...