From 5356cfff0752c9b271541e7bde37b69b08bc8536 Mon Sep 17 00:00:00 2001 From: Isamu Mogi Date: Fri, 6 May 2016 15:11:48 +0900 Subject: [PATCH 1/2] Remove undefined (unused) Bitstream feature. It breaks compilation. See: https://chromium.googlesource.com/webm/libwebp/+/775d3a373c38230d6aa9ea11fb95b8024d94cd49^!/#F0 --- webp/decode.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/webp/decode.go b/webp/decode.go index 46cf7ca..44248bc 100644 --- a/webp/decode.go +++ b/webp/decode.go @@ -37,7 +37,6 @@ type BitstreamFeatures struct { HasAlpha bool // True if data stream contains a alpha channel. HasAnimation bool // True if data stream is an animation Format int // Image compression format - NoIncrementalDecoding bool // True if incremental decording is not using } // GetDecoderVersion returns decoder's version number, packed in hexadecimal. @@ -68,7 +67,6 @@ func GetFeatures(data []byte) (f *BitstreamFeatures, err error) { HasAlpha: cf.has_alpha > 0, HasAnimation: cf.has_animation > 0, Format: int(cf.format), - NoIncrementalDecoding: cf.no_incremental_decoding == 1, } return } From 375e7babdc57d7efaf26a762e48a758e11180795 Mon Sep 17 00:00:00 2001 From: Isamu Mogi Date: Fri, 6 May 2016 15:21:58 +0900 Subject: [PATCH 2/2] Apply 'go fmt' --- webp/decode.go | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/webp/decode.go b/webp/decode.go index 44248bc..334e59a 100644 --- a/webp/decode.go +++ b/webp/decode.go @@ -32,11 +32,11 @@ type DecoderOptions struct { // BitstreamFeatures represents the image properties which are retrived from // data stream. type BitstreamFeatures struct { - Width int // Image width in pixels - Height int // Image height in pixles - HasAlpha bool // True if data stream contains a alpha channel. - HasAnimation bool // True if data stream is an animation - Format int // Image compression format + Width int // Image width in pixels + Height int // Image height in pixles + HasAlpha bool // True if data stream contains a alpha channel. + HasAnimation bool // True if data stream is an animation + Format int // Image compression format } // GetDecoderVersion returns decoder's version number, packed in hexadecimal. @@ -62,11 +62,11 @@ func GetFeatures(data []byte) (f *BitstreamFeatures, err error) { } f = &BitstreamFeatures{ - Width: int(cf.width), // TODO: use Rectangle instaed? - Height: int(cf.height), - HasAlpha: cf.has_alpha > 0, - HasAnimation: cf.has_animation > 0, - Format: int(cf.format), + Width: int(cf.width), // TODO: use Rectangle instaed? + Height: int(cf.height), + HasAlpha: cf.has_alpha > 0, + HasAnimation: cf.has_animation > 0, + Format: int(cf.format), } return }