diff options
author | Christopher Speller <crspeller@gmail.com> | 2016-02-23 14:07:01 -0500 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2016-02-23 14:07:01 -0500 |
commit | 962b18411893e1fffd10c2b6370ac34aba62f146 (patch) | |
tree | 0dfdd3735c18e2c242957cc79d6ca48bce8de1f5 /Godeps/_workspace/src/golang.org/x/image | |
parent | 11093ddb51a70622287aac20108be6c6aa2eb76d (diff) | |
download | chat-962b18411893e1fffd10c2b6370ac34aba62f146.tar.gz chat-962b18411893e1fffd10c2b6370ac34aba62f146.tar.bz2 chat-962b18411893e1fffd10c2b6370ac34aba62f146.zip |
Updating golang dependancies (godep)
Diffstat (limited to 'Godeps/_workspace/src/golang.org/x/image')
36 files changed, 49 insertions, 869 deletions
diff --git a/Godeps/_workspace/src/golang.org/x/image/LICENSE b/Godeps/_workspace/src/golang.org/x/image/LICENSE new file mode 100644 index 000000000..6a66aea5e --- /dev/null +++ b/Godeps/_workspace/src/golang.org/x/image/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/golang.org/x/image/PATENTS b/Godeps/_workspace/src/golang.org/x/image/PATENTS new file mode 100644 index 000000000..733099041 --- /dev/null +++ b/Godeps/_workspace/src/golang.org/x/image/PATENTS @@ -0,0 +1,22 @@ +Additional IP Rights Grant (Patents) + +"This implementation" means the copyrightable works distributed by +Google as part of the Go project. + +Google hereby grants to You a perpetual, worldwide, non-exclusive, +no-charge, royalty-free, irrevocable (except as stated in this section) +patent license to make, have made, use, offer to sell, sell, import, +transfer and otherwise run, modify and propagate the contents of this +implementation of Go, where such license applies only to those patent +claims, both currently owned or controlled by Google and acquired in +the future, licensable by Google that are necessarily infringed by this +implementation of Go. This grant does not include claims that would be +infringed only as a consequence of further modification of this +implementation. If you or your agent or exclusive licensee institute or +order or agree to the institution of patent litigation against any +entity (including a cross-claim or counterclaim in a lawsuit) alleging +that this implementation of Go or any code incorporated within this +implementation of Go constitutes direct or contributory patent +infringement, or inducement of patent infringement, then any patent +rights granted to you under this License for this implementation of Go +shall terminate as of the date such litigation is filed. diff --git a/Godeps/_workspace/src/golang.org/x/image/bmp/reader_test.go b/Godeps/_workspace/src/golang.org/x/image/bmp/reader_test.go deleted file mode 100644 index fd6ff64f6..000000000 --- a/Godeps/_workspace/src/golang.org/x/image/bmp/reader_test.go +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright 2012 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package bmp - -import ( - "fmt" - "image" - "os" - "testing" - - _ "image/png" -) - -const testdataDir = "../testdata/" - -func compare(t *testing.T, img0, img1 image.Image) error { - b := img1.Bounds() - if !b.Eq(img0.Bounds()) { - return fmt.Errorf("wrong image size: want %s, got %s", img0.Bounds(), b) - } - for y := b.Min.Y; y < b.Max.Y; y++ { - for x := b.Min.X; x < b.Max.X; x++ { - c0 := img0.At(x, y) - c1 := img1.At(x, y) - r0, g0, b0, a0 := c0.RGBA() - r1, g1, b1, a1 := c1.RGBA() - if r0 != r1 || g0 != g1 || b0 != b1 || a0 != a1 { - return fmt.Errorf("pixel at (%d, %d) has wrong color: want %v, got %v", x, y, c0, c1) - } - } - } - return nil -} - -// TestDecode tests that decoding a PNG image and a BMP image result in the -// same pixel data. -func TestDecode(t *testing.T) { - testCases := []string{ - "video-001", - "yellow_rose-small", - } - - for _, tc := range testCases { - f0, err := os.Open(testdataDir + tc + ".png") - if err != nil { - t.Errorf("%s: Open PNG: %v", tc, err) - continue - } - defer f0.Close() - img0, _, err := image.Decode(f0) - if err != nil { - t.Errorf("%s: Decode PNG: %v", tc, err) - continue - } - - f1, err := os.Open(testdataDir + tc + ".bmp") - if err != nil { - t.Errorf("%s: Open BMP: %v", tc, err) - continue - } - defer f1.Close() - img1, _, err := image.Decode(f1) - if err != nil { - t.Errorf("%s: Decode BMP: %v", tc, err) - continue - } - - if err := compare(t, img0, img1); err != nil { - t.Errorf("%s: %v", tc, err) - continue - } - } -} diff --git a/Godeps/_workspace/src/golang.org/x/image/bmp/writer_test.go b/Godeps/_workspace/src/golang.org/x/image/bmp/writer_test.go deleted file mode 100644 index 9e5a32741..000000000 --- a/Godeps/_workspace/src/golang.org/x/image/bmp/writer_test.go +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright 2013 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package bmp - -import ( - "bytes" - "fmt" - "image" - "io/ioutil" - "os" - "testing" - "time" -) - -func openImage(filename string) (image.Image, error) { - f, err := os.Open(testdataDir + filename) - if err != nil { - return nil, err - } - defer f.Close() - return Decode(f) -} - -func TestEncode(t *testing.T) { - img0, err := openImage("video-001.bmp") - if err != nil { - t.Fatal(err) - } - - buf := new(bytes.Buffer) - err = Encode(buf, img0) - if err != nil { - t.Fatal(err) - } - - img1, err := Decode(buf) - if err != nil { - t.Fatal(err) - } - - compare(t, img0, img1) -} - -// TestZeroWidthVeryLargeHeight tests that encoding and decoding a degenerate -// image with zero width but over one billion pixels in height is faster than -// naively calling an io.Reader or io.Writer method once per row. -func TestZeroWidthVeryLargeHeight(t *testing.T) { - c := make(chan error, 1) - go func() { - b := image.Rect(0, 0, 0, 0x3fffffff) - var buf bytes.Buffer - if err := Encode(&buf, image.NewRGBA(b)); err != nil { - c <- err - return - } - m, err := Decode(&buf) - if err != nil { - c <- err - return - } - if got := m.Bounds(); got != b { - c <- fmt.Errorf("bounds: got %v, want %v", got, b) - return - } - c <- nil - }() - select { - case err := <-c: - if err != nil { - t.Fatal(err) - } - case <-time.After(3 * time.Second): - t.Fatalf("timed out") - } -} - -// BenchmarkEncode benchmarks the encoding of an image. -func BenchmarkEncode(b *testing.B) { - img, err := openImage("video-001.bmp") - if err != nil { - b.Fatal(err) - } - s := img.Bounds().Size() - b.SetBytes(int64(s.X * s.Y * 4)) - b.ResetTimer() - for i := 0; i < b.N; i++ { - Encode(ioutil.Discard, img) - } -} diff --git a/Godeps/_workspace/src/golang.org/x/image/font/plan9font/example_test.go b/Godeps/_workspace/src/golang.org/x/image/font/plan9font/example_test.go deleted file mode 100644 index c1eacb230..000000000 --- a/Godeps/_workspace/src/golang.org/x/image/font/plan9font/example_test.go +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright 2015 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package plan9font_test - -import ( - "image" - "image/draw" - "io/ioutil" - "log" - "os" - "path" - "path/filepath" - - "golang.org/x/image/font" - "golang.org/x/image/font/plan9font" - "golang.org/x/image/math/fixed" -) - -func ExampleParseFont() { - readFile := func(name string) ([]byte, error) { - return ioutil.ReadFile(filepath.FromSlash(path.Join("../testdata/fixed", name))) - } - fontData, err := readFile("unicode.7x13.font") - if err != nil { - log.Fatal(err) - } - face, err := plan9font.ParseFont(fontData, readFile) - if err != nil { - log.Fatal(err) - } - // TODO: derive the ascent from the face's metrics. - const ascent = 11 - - dst := image.NewRGBA(image.Rect(0, 0, 4*7, 13)) - draw.Draw(dst, dst.Bounds(), image.Black, image.Point{}, draw.Src) - d := &font.Drawer{ - Dst: dst, - Src: image.White, - Face: face, - Dot: fixed.P(0, ascent), - } - // Draw: - // - U+0053 LATIN CAPITAL LETTER S - // - U+03A3 GREEK CAPITAL LETTER SIGMA - // - U+222B INTEGRAL - // - U+3055 HIRAGANA LETTER SA - // The testdata does not contain the CJK subfont files, so U+3055 HIRAGANA - // LETTER SA (さ) should be rendered as U+FFFD REPLACEMENT CHARACTER (�). - // - // The missing subfont file will trigger an "open - // ../testdata/shinonome/k12.3000: no such file or directory" log message. - // This is expected and can be ignored. - d.DrawString("SΣ∫さ") - - // Convert the dst image to ASCII art. - var out []byte - b := dst.Bounds() - for y := b.Min.Y; y < b.Max.Y; y++ { - out = append(out, '0'+byte(y%10), ' ') - for x := b.Min.X; x < b.Max.X; x++ { - if dst.RGBAAt(x, y).R > 0 { - out = append(out, 'X') - } else { - out = append(out, '.') - } - } - // Highlight the last row before the baseline. Glyphs like 'S' without - // descenders should not affect any pixels whose Y coordinate is >= the - // baseline. - if y == ascent-1 { - out = append(out, '_') - } - out = append(out, '\n') - } - os.Stdout.Write(out) - - // Output: - // 0 ..................X......... - // 1 .................X.X........ - // 2 .XXXX..XXXXXX....X.....XXX.. - // 3 X....X.X.........X....XX.XX. - // 4 X.......X........X....X.X.X. - // 5 X........X.......X....XXX.X. - // 6 .XXXX.....X......X....XX.XX. - // 7 .....X...X.......X....XX.XX. - // 8 .....X..X........X....XXXXX. - // 9 X....X.X.........X....XX.XX. - // 0 .XXXX..XXXXXX....X.....XXX.._ - // 1 ...............X.X.......... - // 2 ................X........... -} diff --git a/Godeps/_workspace/src/golang.org/x/image/font/testdata/fixed/7x13.0000 b/Godeps/_workspace/src/golang.org/x/image/font/testdata/fixed/7x13.0000 Binary files differdeleted file mode 100644 index 9509cdf97..000000000 --- a/Godeps/_workspace/src/golang.org/x/image/font/testdata/fixed/7x13.0000 +++ /dev/null diff --git a/Godeps/_workspace/src/golang.org/x/image/font/testdata/fixed/7x13.0100 b/Godeps/_workspace/src/golang.org/x/image/font/testdata/fixed/7x13.0100 Binary files differdeleted file mode 100644 index 0a79f555c..000000000 --- a/Godeps/_workspace/src/golang.org/x/image/font/testdata/fixed/7x13.0100 +++ /dev/null diff --git a/Godeps/_workspace/src/golang.org/x/image/font/testdata/fixed/7x13.0200 b/Godeps/_workspace/src/golang.org/x/image/font/testdata/fixed/7x13.0200 Binary files differdeleted file mode 100644 index e25247ecc..000000000 --- a/Godeps/_workspace/src/golang.org/x/image/font/testdata/fixed/7x13.0200 +++ /dev/null diff --git a/Godeps/_workspace/src/golang.org/x/image/font/testdata/fixed/7x13.0300 b/Godeps/_workspace/src/golang.org/x/image/font/testdata/fixed/7x13.0300 Binary files differdeleted file mode 100644 index 86eb33f42..000000000 --- a/Godeps/_workspace/src/golang.org/x/image/font/testdata/fixed/7x13.0300 +++ /dev/null diff --git a/Godeps/_workspace/src/golang.org/x/image/font/testdata/fixed/7x13.0400 b/Godeps/_workspace/src/golang.org/x/image/font/testdata/fixed/7x13.0400 Binary files differdeleted file mode 100644 index 43300ad95..000000000 --- a/Godeps/_workspace/src/golang.org/x/image/font/testdata/fixed/7x13.0400 +++ /dev/null diff --git a/Godeps/_workspace/src/golang.org/x/image/font/testdata/fixed/7x13.0500 b/Godeps/_workspace/src/golang.org/x/image/font/testdata/fixed/7x13.0500 Binary files differdeleted file mode 100644 index 2d9326708..000000000 --- a/Godeps/_workspace/src/golang.org/x/image/font/testdata/fixed/7x13.0500 +++ /dev/null diff --git a/Godeps/_workspace/src/golang.org/x/image/font/testdata/fixed/7x13.0E00 b/Godeps/_workspace/src/golang.org/x/image/font/testdata/fixed/7x13.0E00 Binary files differdeleted file mode 100644 index 7c51a1e51..000000000 --- a/Godeps/_workspace/src/golang.org/x/image/font/testdata/fixed/7x13.0E00 +++ /dev/null diff --git a/Godeps/_workspace/src/golang.org/x/image/font/testdata/fixed/7x13.1000 b/Godeps/_workspace/src/golang.org/x/image/font/testdata/fixed/7x13.1000 Binary files differdeleted file mode 100644 index 019698c8d..000000000 --- a/Godeps/_workspace/src/golang.org/x/image/font/testdata/fixed/7x13.1000 +++ /dev/null diff --git a/Godeps/_workspace/src/golang.org/x/image/font/testdata/fixed/7x13.1600 b/Godeps/_workspace/src/golang.org/x/image/font/testdata/fixed/7x13.1600 Binary files differdeleted file mode 100644 index f69a97745..000000000 --- a/Godeps/_workspace/src/golang.org/x/image/font/testdata/fixed/7x13.1600 +++ /dev/null diff --git a/Godeps/_workspace/src/golang.org/x/image/font/testdata/fixed/7x13.1E00 b/Godeps/_workspace/src/golang.org/x/image/font/testdata/fixed/7x13.1E00 Binary files differdeleted file mode 100644 index 3bc5068cf..000000000 --- a/Godeps/_workspace/src/golang.org/x/image/font/testdata/fixed/7x13.1E00 +++ /dev/null diff --git a/Godeps/_workspace/src/golang.org/x/image/font/testdata/fixed/7x13.1F00 b/Godeps/_workspace/src/golang.org/x/image/font/testdata/fixed/7x13.1F00 Binary files differdeleted file mode 100644 index 43b320be1..000000000 --- a/Godeps/_workspace/src/golang.org/x/image/font/testdata/fixed/7x13.1F00 +++ /dev/null diff --git a/Godeps/_workspace/src/golang.org/x/image/font/testdata/fixed/7x13.2000 b/Godeps/_workspace/src/golang.org/x/image/font/testdata/fixed/7x13.2000 Binary files differdeleted file mode 100644 index f9244e1cf..000000000 --- a/Godeps/_workspace/src/golang.org/x/image/font/testdata/fixed/7x13.2000 +++ /dev/null diff --git a/Godeps/_workspace/src/golang.org/x/image/font/testdata/fixed/7x13.2100 b/Godeps/_workspace/src/golang.org/x/image/font/testdata/fixed/7x13.2100 Binary files differdeleted file mode 100644 index c565abb7d..000000000 --- a/Godeps/_workspace/src/golang.org/x/image/font/testdata/fixed/7x13.2100 +++ /dev/null diff --git a/Godeps/_workspace/src/golang.org/x/image/font/testdata/fixed/7x13.2200 b/Godeps/_workspace/src/golang.org/x/image/font/testdata/fixed/7x13.2200 Binary files differdeleted file mode 100644 index a992d3521..000000000 --- a/Godeps/_workspace/src/golang.org/x/image/font/testdata/fixed/7x13.2200 +++ /dev/null diff --git a/Godeps/_workspace/src/golang.org/x/image/font/testdata/fixed/7x13.2300 b/Godeps/_workspace/src/golang.org/x/image/font/testdata/fixed/7x13.2300 Binary files differdeleted file mode 100644 index 8ff099d19..000000000 --- a/Godeps/_workspace/src/golang.org/x/image/font/testdata/fixed/7x13.2300 +++ /dev/null diff --git a/Godeps/_workspace/src/golang.org/x/image/font/testdata/fixed/7x13.2400 b/Godeps/_workspace/src/golang.org/x/image/font/testdata/fixed/7x13.2400 Binary files differdeleted file mode 100644 index 99927a11f..000000000 --- a/Godeps/_workspace/src/golang.org/x/image/font/testdata/fixed/7x13.2400 +++ /dev/null diff --git a/Godeps/_workspace/src/golang.org/x/image/font/testdata/fixed/7x13.2500 b/Godeps/_workspace/src/golang.org/x/image/font/testdata/fixed/7x13.2500 Binary files differdeleted file mode 100644 index 60dc224cd..000000000 --- a/Godeps/_workspace/src/golang.org/x/image/font/testdata/fixed/7x13.2500 +++ /dev/null diff --git a/Godeps/_workspace/src/golang.org/x/image/font/testdata/fixed/7x13.2600 b/Godeps/_workspace/src/golang.org/x/image/font/testdata/fixed/7x13.2600 Binary files differdeleted file mode 100644 index 1b393c28b..000000000 --- a/Godeps/_workspace/src/golang.org/x/image/font/testdata/fixed/7x13.2600 +++ /dev/null diff --git a/Godeps/_workspace/src/golang.org/x/image/font/testdata/fixed/7x13.2700 b/Godeps/_workspace/src/golang.org/x/image/font/testdata/fixed/7x13.2700 Binary files differdeleted file mode 100644 index c39a57206..000000000 --- a/Godeps/_workspace/src/golang.org/x/image/font/testdata/fixed/7x13.2700 +++ /dev/null diff --git a/Godeps/_workspace/src/golang.org/x/image/font/testdata/fixed/7x13.2800 b/Godeps/_workspace/src/golang.org/x/image/font/testdata/fixed/7x13.2800 Binary files differdeleted file mode 100644 index c7572de47..000000000 --- a/Godeps/_workspace/src/golang.org/x/image/font/testdata/fixed/7x13.2800 +++ /dev/null diff --git a/Godeps/_workspace/src/golang.org/x/image/font/testdata/fixed/7x13.2A00 b/Godeps/_workspace/src/golang.org/x/image/font/testdata/fixed/7x13.2A00 Binary files differdeleted file mode 100644 index 71791ace6..000000000 --- a/Godeps/_workspace/src/golang.org/x/image/font/testdata/fixed/7x13.2A00 +++ /dev/null diff --git a/Godeps/_workspace/src/golang.org/x/image/font/testdata/fixed/7x13.3000 b/Godeps/_workspace/src/golang.org/x/image/font/testdata/fixed/7x13.3000 Binary files differdeleted file mode 100644 index fb830f4fb..000000000 --- a/Godeps/_workspace/src/golang.org/x/image/font/testdata/fixed/7x13.3000 +++ /dev/null diff --git a/Godeps/_workspace/src/golang.org/x/image/font/testdata/fixed/7x13.FB00 b/Godeps/_workspace/src/golang.org/x/image/font/testdata/fixed/7x13.FB00 Binary files differdeleted file mode 100644 index 3a0b30a99..000000000 --- a/Godeps/_workspace/src/golang.org/x/image/font/testdata/fixed/7x13.FB00 +++ /dev/null diff --git a/Godeps/_workspace/src/golang.org/x/image/font/testdata/fixed/7x13.FE00 b/Godeps/_workspace/src/golang.org/x/image/font/testdata/fixed/7x13.FE00 Binary files differdeleted file mode 100644 index 3989d2673..000000000 --- a/Godeps/_workspace/src/golang.org/x/image/font/testdata/fixed/7x13.FE00 +++ /dev/null diff --git a/Godeps/_workspace/src/golang.org/x/image/font/testdata/fixed/7x13.FF00 b/Godeps/_workspace/src/golang.org/x/image/font/testdata/fixed/7x13.FF00 Binary files differdeleted file mode 100644 index 78ed39865..000000000 --- a/Godeps/_workspace/src/golang.org/x/image/font/testdata/fixed/7x13.FF00 +++ /dev/null diff --git a/Godeps/_workspace/src/golang.org/x/image/font/testdata/fixed/README b/Godeps/_workspace/src/golang.org/x/image/font/testdata/fixed/README deleted file mode 100644 index a39f8a5e2..000000000 --- a/Godeps/_workspace/src/golang.org/x/image/font/testdata/fixed/README +++ /dev/null @@ -1,9 +0,0 @@ -These font files were copied from the Plan 9 Port's font/fixed directory. The -README in that directory states that: "These fonts are converted from the BDFs -in the XFree86 distribution. They were all marked as public domain." - -The Plan 9 Port is at https://github.com/9fans/plan9port and the copy was made -from commit a78b1841 (2015-08-18). - -The unicode.7x13.font file also refers to a ../shinonome directory, but this -testdata does not include those subfont files. diff --git a/Godeps/_workspace/src/golang.org/x/image/font/testdata/fixed/unicode.7x13.font b/Godeps/_workspace/src/golang.org/x/image/font/testdata/fixed/unicode.7x13.font deleted file mode 100644 index 337b4286b..000000000 --- a/Godeps/_workspace/src/golang.org/x/image/font/testdata/fixed/unicode.7x13.font +++ /dev/null @@ -1,68 +0,0 @@ -13 10 -0x0000 0x001F 7x13.2400 -0x0000 0x00FF 7x13.0000 -0x0100 0x01FF 7x13.0100 -0x0200 0x02FF 7x13.0200 -0x0300 0x03FF 7x13.0300 -0x0400 0x04FF 7x13.0400 -0x0500 0x05FF 7x13.0500 -0x0E00 0x0EFF 7x13.0E00 -0x1000 0x10FF 7x13.1000 -0x1600 0x16FF 7x13.1600 -0x1E00 0x1EFF 7x13.1E00 -0x1F00 0x1FFF 7x13.1F00 -0x2000 0x20FF 7x13.2000 -0x2100 0x21FF 7x13.2100 -0x2200 0x22FF 7x13.2200 -0x2300 0x23FF 7x13.2300 -0x2400 0x24FF 7x13.2400 -0x2500 0x25FF 7x13.2500 -0x2600 0x26FF 7x13.2600 -0x2700 0x27FF 7x13.2700 -0x2800 0x28FF 7x13.2800 -0x2A00 0x2AFF 7x13.2A00 -0x3000 0x30fe ../shinonome/k12.3000 -0x4e00 0x4ffe ../shinonome/k12.4e00 -0x5005 0x51fe ../shinonome/k12.5005 -0x5200 0x53fa ../shinonome/k12.5200 -0x5401 0x55fe ../shinonome/k12.5401 -0x5606 0x57fc ../shinonome/k12.5606 -0x5800 0x59ff ../shinonome/k12.5800 -0x5a01 0x5bff ../shinonome/k12.5a01 -0x5c01 0x5dfe ../shinonome/k12.5c01 -0x5e02 0x5fff ../shinonome/k12.5e02 -0x600e 0x61ff ../shinonome/k12.600e -0x6200 0x63fa ../shinonome/k12.6200 -0x6406 0x65fb ../shinonome/k12.6406 -0x6602 0x67ff ../shinonome/k12.6602 -0x6802 0x69ff ../shinonome/k12.6802 -0x6a02 0x6bf3 ../shinonome/k12.6a02 -0x6c08 0x6dfb ../shinonome/k12.6c08 -0x6e05 0x6ffe ../shinonome/k12.6e05 -0x7001 0x71ff ../shinonome/k12.7001 -0x7206 0x73fe ../shinonome/k12.7206 -0x7403 0x75ff ../shinonome/k12.7403 -0x7601 0x77fc ../shinonome/k12.7601 -0x7802 0x79fb ../shinonome/k12.7802 -0x7a00 0x7bf7 ../shinonome/k12.7a00 -0x7c00 0x7dfb ../shinonome/k12.7c00 -0x7e01 0x7ffc ../shinonome/k12.7e01 -0x8000 0x81fe ../shinonome/k12.8000 -0x8201 0x83fd ../shinonome/k12.8201 -0x8403 0x85fe ../shinonome/k12.8403 -0x8602 0x87fe ../shinonome/k12.8602 -0x8805 0x89f8 ../shinonome/k12.8805 -0x8a00 0x8b9a ../shinonome/k12.8a00 -0x8c37 0x8dff ../shinonome/k12.8c37 -0x8e08 0x8ffd ../shinonome/k12.8e08 -0x9000 0x91ff ../shinonome/k12.9000 -0x920d 0x93e8 ../shinonome/k12.920d -0x9403 0x95e5 ../shinonome/k12.9403 -0x961c 0x97ff ../shinonome/k12.961c -0x9801 0x99ff ../shinonome/k12.9801 -0x9a01 0x9bf5 ../shinonome/k12.9a01 -0x9c04 0x9dfd ../shinonome/k12.9c04 -0x9e1a 0x9fa0 ../shinonome/k12.9e1a -0xFB00 0xFBFF 7x13.FB00 -0xFE00 0xFEFF 7x13.FE00 -0xFF00 0xFFFF 7x13.FF00 diff --git a/Godeps/_workspace/src/golang.org/x/image/math/fixed/fixed_test.go b/Godeps/_workspace/src/golang.org/x/image/math/fixed/fixed_test.go deleted file mode 100644 index e252de7cb..000000000 --- a/Godeps/_workspace/src/golang.org/x/image/math/fixed/fixed_test.go +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright 2015 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package fixed - -import ( - "testing" -) - -func TestInt26_6(t *testing.T) { - got := Int26_6(1<<6 + 1<<4).String() - want := "1:16" - if got != want { - t.Fatalf("got %q, want %q", got, want) - } -} - -func TestInt52_12(t *testing.T) { - got := Int52_12(1<<12 + 1<<10).String() - want := "1:1024" - if got != want { - t.Fatalf("got %q, want %q", got, want) - } -} diff --git a/Godeps/_workspace/src/golang.org/x/image/tiff/buffer_test.go b/Godeps/_workspace/src/golang.org/x/image/tiff/buffer_test.go deleted file mode 100644 index e13afb361..000000000 --- a/Godeps/_workspace/src/golang.org/x/image/tiff/buffer_test.go +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright 2011 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package tiff - -import ( - "io" - "strings" - "testing" -) - -var readAtTests = []struct { - n int - off int64 - s string - err error -}{ - {2, 0, "ab", nil}, - {6, 0, "abcdef", nil}, - {3, 3, "def", nil}, - {3, 5, "f", io.EOF}, - {3, 6, "", io.EOF}, -} - -func TestReadAt(t *testing.T) { - r := newReaderAt(strings.NewReader("abcdef")) - b := make([]byte, 10) - for _, test := range readAtTests { - n, err := r.ReadAt(b[:test.n], test.off) - s := string(b[:n]) - if s != test.s || err != test.err { - t.Errorf("buffer.ReadAt(<%v bytes>, %v): got %v, %q; want %v, %q", test.n, test.off, err, s, test.err, test.s) - } - } -} diff --git a/Godeps/_workspace/src/golang.org/x/image/tiff/reader_test.go b/Godeps/_workspace/src/golang.org/x/image/tiff/reader_test.go deleted file mode 100644 index f5c02e697..000000000 --- a/Godeps/_workspace/src/golang.org/x/image/tiff/reader_test.go +++ /dev/null @@ -1,377 +0,0 @@ -// Copyright 2011 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package tiff - -import ( - "bytes" - "encoding/binary" - "encoding/hex" - "errors" - "image" - "io/ioutil" - "os" - "strings" - "testing" - - _ "image/png" -) - -const testdataDir = "../testdata/" - -// Read makes *buffer implements io.Reader, so that we can pass one to Decode. -func (*buffer) Read([]byte) (int, error) { - panic("unimplemented") -} - -func load(name string) (image.Image, error) { - f, err := os.Open(testdataDir + name) - if err != nil { - return nil, err - } - defer f.Close() - img, _, err := image.Decode(f) - if err != nil { - return nil, err - } - return img, nil -} - -// TestNoRPS tests decoding an image that has no RowsPerStrip tag. The tag is -// mandatory according to the spec but some software omits it in the case of a -// single strip. -func TestNoRPS(t *testing.T) { - _, err := load("no_rps.tiff") - if err != nil { - t.Fatal(err) - } -} - -// TestNoCompression tests decoding an image that has no Compression tag. This -// tag is mandatory, but most tools interpret a missing value as no -// compression. -func TestNoCompression(t *testing.T) { - _, err := load("no_compress.tiff") - if err != nil { - t.Fatal(err) - } -} - -// TestUnpackBits tests the decoding of PackBits-encoded data. -func TestUnpackBits(t *testing.T) { - var unpackBitsTests = []struct { - compressed string - uncompressed string - }{{ - // Example data from Wikipedia. - "\xfe\xaa\x02\x80\x00\x2a\xfd\xaa\x03\x80\x00\x2a\x22\xf7\xaa", - "\xaa\xaa\xaa\x80\x00\x2a\xaa\xaa\xaa\xaa\x80\x00\x2a\x22\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa", - }} - for _, u := range unpackBitsTests { - buf, err := unpackBits(strings.NewReader(u.compressed)) - if err != nil { - t.Fatal(err) - } - if string(buf) != u.uncompressed { - t.Fatalf("unpackBits: want %x, got %x", u.uncompressed, buf) - } - } -} - -func TestShortBlockData(t *testing.T) { - b, err := ioutil.ReadFile("../testdata/bw-uncompressed.tiff") - if err != nil { - t.Fatal(err) - } - // The bw-uncompressed.tiff image is a 153x55 bi-level image. This is 1 bit - // per pixel, or 20 bytes per row, times 55 rows, or 1100 bytes of pixel - // data. 1100 in hex is 0x44c, or "\x4c\x04" in little-endian. We replace - // that byte count (StripByteCounts-tagged data) by something less than - // that, so that there is not enough pixel data. - old := []byte{0x4c, 0x04} - new := []byte{0x01, 0x01} - i := bytes.Index(b, old) - if i < 0 { - t.Fatal(`could not find "\x4c\x04" byte count`) - } - if bytes.Contains(b[i+len(old):], old) { - t.Fatal(`too many occurrences of "\x4c\x04"`) - } - b[i+0] = new[0] - b[i+1] = new[1] - if _, err = Decode(bytes.NewReader(b)); err == nil { - t.Fatal("got nil error, want non-nil") - } -} - -func TestDecodeInvalidDataType(t *testing.T) { - b, err := ioutil.ReadFile("../testdata/bw-uncompressed.tiff") - if err != nil { - t.Fatal(err) - } - - // off is the offset of the ImageWidth tag. It is the offset of the overall - // IFD block (0x00000454), plus 2 for the uint16 number of IFD entries, plus 12 - // to skip the first entry. - const off = 0x00000454 + 2 + 12*1 - - if v := binary.LittleEndian.Uint16(b[off : off+2]); v != tImageWidth { - t.Fatal(`could not find ImageWidth tag`) - } - binary.LittleEndian.PutUint16(b[off+2:], uint16(len(lengths))) // invalid datatype - - if _, err = Decode(bytes.NewReader(b)); err == nil { - t.Fatal("got nil error, want non-nil") - } -} - -func compare(t *testing.T, img0, img1 image.Image) { - b0 := img0.Bounds() - b1 := img1.Bounds() - if b0.Dx() != b1.Dx() || b0.Dy() != b1.Dy() { - t.Fatalf("wrong image size: want %s, got %s", b0, b1) - } - x1 := b1.Min.X - b0.Min.X - y1 := b1.Min.Y - b0.Min.Y - for y := b0.Min.Y; y < b0.Max.Y; y++ { - for x := b0.Min.X; x < b0.Max.X; x++ { - c0 := img0.At(x, y) - c1 := img1.At(x+x1, y+y1) - r0, g0, b0, a0 := c0.RGBA() - r1, g1, b1, a1 := c1.RGBA() - if r0 != r1 || g0 != g1 || b0 != b1 || a0 != a1 { - t.Fatalf("pixel at (%d, %d) has wrong color: want %v, got %v", x, y, c0, c1) - } - } - } -} - -// TestDecode tests that decoding a PNG image and a TIFF image result in the -// same pixel data. -func TestDecode(t *testing.T) { - img0, err := load("video-001.png") - if err != nil { - t.Fatal(err) - } - img1, err := load("video-001.tiff") - if err != nil { - t.Fatal(err) - } - img2, err := load("video-001-strip-64.tiff") - if err != nil { - t.Fatal(err) - } - img3, err := load("video-001-tile-64x64.tiff") - if err != nil { - t.Fatal(err) - } - img4, err := load("video-001-16bit.tiff") - if err != nil { - t.Fatal(err) - } - - compare(t, img0, img1) - compare(t, img0, img2) - compare(t, img0, img3) - compare(t, img0, img4) -} - -// TestDecodeLZW tests that decoding a PNG image and a LZW-compressed TIFF -// image result in the same pixel data. -func TestDecodeLZW(t *testing.T) { - img0, err := load("blue-purple-pink.png") - if err != nil { - t.Fatal(err) - } - img1, err := load("blue-purple-pink.lzwcompressed.tiff") - if err != nil { - t.Fatal(err) - } - - compare(t, img0, img1) -} - -// TestDecompress tests that decoding some TIFF images that use different -// compression formats result in the same pixel data. -func TestDecompress(t *testing.T) { - var decompressTests = []string{ - "bw-uncompressed.tiff", - "bw-deflate.tiff", - "bw-packbits.tiff", - } - var img0 image.Image - for _, name := range decompressTests { - img1, err := load(name) - if err != nil { - t.Fatalf("decoding %s: %v", name, err) - } - if img0 == nil { - img0 = img1 - continue - } - compare(t, img0, img1) - } -} - -func replace(src []byte, find, repl string) ([]byte, error) { - removeSpaces := func(r rune) rune { - if r != ' ' { - return r - } - return -1 - } - - f, err := hex.DecodeString(strings.Map(removeSpaces, find)) - if err != nil { - return nil, err - } - r, err := hex.DecodeString(strings.Map(removeSpaces, repl)) - if err != nil { - return nil, err - } - dst := bytes.Replace(src, f, r, 1) - if bytes.Equal(dst, src) { - return nil, errors.New("replacement failed") - } - return dst, nil -} - -// TestZeroBitsPerSample tests that an IFD with a bitsPerSample of 0 does not -// cause a crash. -// Issue 10711. -func TestZeroBitsPerSample(t *testing.T) { - b0, err := ioutil.ReadFile(testdataDir + "bw-deflate.tiff") - if err != nil { - t.Fatal(err) - } - - // Mutate the loaded image to have the problem. - // 02 01: tag number (tBitsPerSample) - // 03 00: data type (short, or uint16) - // 01 00 00 00: count - // ?? 00 00 00: value (1 -> 0) - b1, err := replace(b0, - "02 01 03 00 01 00 00 00 01 00 00 00", - "02 01 03 00 01 00 00 00 00 00 00 00", - ) - if err != nil { - t.Fatal(err) - } - - _, err = Decode(bytes.NewReader(b1)) - if err == nil { - t.Fatal("Decode with 0 bits per sample: got nil error, want non-nil") - } -} - -// TestTileTooBig tests that we do not panic when a tile is too big compared to -// the data available. -// Issue 10712 -func TestTileTooBig(t *testing.T) { - b0, err := ioutil.ReadFile(testdataDir + "video-001-tile-64x64.tiff") - if err != nil { - t.Fatal(err) - } - - // Mutate the loaded image to have the problem. - // - // 42 01: tag number (tTileWidth) - // 03 00: data type (short, or uint16) - // 01 00 00 00: count - // xx 00 00 00: value (0x40 -> 0x44: a wider tile consumes more data - // than is available) - b1, err := replace(b0, - "42 01 03 00 01 00 00 00 40 00 00 00", - "42 01 03 00 01 00 00 00 44 00 00 00", - ) - if err != nil { - t.Fatal(err) - } - - // Turn off the predictor, which makes it possible to hit the - // place with the defect. Without this patch to the image, we run - // out of data too early, and do not hit the part of the code where - // the original panic was. - // - // 3d 01: tag number (tPredictor) - // 03 00: data type (short, or uint16) - // 01 00 00 00: count - // xx 00 00 00: value (2 -> 1: 2 = horizontal, 1 = none) - b2, err := replace(b1, - "3d 01 03 00 01 00 00 00 02 00 00 00", - "3d 01 03 00 01 00 00 00 01 00 00 00", - ) - if err != nil { - t.Fatal(err) - } - - _, err = Decode(bytes.NewReader(b2)) - if err == nil { - t.Fatal("did not expect nil error") - } -} - -// TestZeroSizedImages tests that decoding does not panic when image dimensions -// are zero, and returns a zero-sized image instead. -// Issue 10393. -func TestZeroSizedImages(t *testing.T) { - testsizes := []struct { - w, h int - }{ - {0, 0}, - {1, 0}, - {0, 1}, - {1, 1}, - } - for _, r := range testsizes { - img := image.NewRGBA(image.Rect(0, 0, r.w, r.h)) - var buf bytes.Buffer - if err := Encode(&buf, img, nil); err != nil { - t.Errorf("encode w=%d h=%d: %v", r.w, r.h, err) - continue - } - if _, err := Decode(&buf); err != nil { - t.Errorf("decode w=%d h=%d: %v", r.w, r.h, err) - } - } -} - -// TestLargeIFDEntry tests that a large IFD entry does not cause Decode to -// panic. -// Issue 10596. -func TestLargeIFDEntry(t *testing.T) { - testdata := "II*\x00\x08\x00\x00\x00\f\x000000000000" + - "00000000000000000000" + - "00000000000000000000" + - "00000000000000000000" + - "00000000000000\x17\x01\x04\x00\x01\x00" + - "\x00\xc0000000000000000000" + - "00000000000000000000" + - "00000000000000000000" + - "000000" - _, err := Decode(strings.NewReader(testdata)) - if err == nil { - t.Fatal("Decode with large IFD entry: got nil error, want non-nil") - } -} - -// benchmarkDecode benchmarks the decoding of an image. -func benchmarkDecode(b *testing.B, filename string) { - b.StopTimer() - contents, err := ioutil.ReadFile(testdataDir + filename) - if err != nil { - b.Fatal(err) - } - r := &buffer{buf: contents} - b.StartTimer() - for i := 0; i < b.N; i++ { - _, err := Decode(r) - if err != nil { - b.Fatal("Decode:", err) - } - } -} - -func BenchmarkDecodeCompressed(b *testing.B) { benchmarkDecode(b, "video-001.tiff") } -func BenchmarkDecodeUncompressed(b *testing.B) { benchmarkDecode(b, "video-001-uncompressed.tiff") } diff --git a/Godeps/_workspace/src/golang.org/x/image/tiff/writer_test.go b/Godeps/_workspace/src/golang.org/x/image/tiff/writer_test.go deleted file mode 100644 index c8fb7bf37..000000000 --- a/Godeps/_workspace/src/golang.org/x/image/tiff/writer_test.go +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright 2012 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package tiff - -import ( - "bytes" - "image" - "io/ioutil" - "os" - "testing" -) - -var roundtripTests = []struct { - filename string - opts *Options -}{ - {"video-001.tiff", nil}, - {"video-001-16bit.tiff", nil}, - {"video-001-gray.tiff", nil}, - {"video-001-gray-16bit.tiff", nil}, - {"video-001-paletted.tiff", nil}, - {"bw-packbits.tiff", nil}, - {"video-001.tiff", &Options{Predictor: true}}, - {"video-001.tiff", &Options{Compression: Deflate}}, - {"video-001.tiff", &Options{Predictor: true, Compression: Deflate}}, -} - -func openImage(filename string) (image.Image, error) { - f, err := os.Open(testdataDir + filename) - if err != nil { - return nil, err - } - defer f.Close() - return Decode(f) -} - -func TestRoundtrip(t *testing.T) { - for _, rt := range roundtripTests { - img, err := openImage(rt.filename) - if err != nil { - t.Fatal(err) - } - out := new(bytes.Buffer) - err = Encode(out, img, rt.opts) - if err != nil { - t.Fatal(err) - } - - img2, err := Decode(&buffer{buf: out.Bytes()}) - if err != nil { - t.Fatal(err) - } - compare(t, img, img2) - } -} - -// TestRoundtrip2 tests that encoding and decoding an image whose -// origin is not (0, 0) gives the same thing. -func TestRoundtrip2(t *testing.T) { - m0 := image.NewRGBA(image.Rect(3, 4, 9, 8)) - for i := range m0.Pix { - m0.Pix[i] = byte(i) - } - out := new(bytes.Buffer) - if err := Encode(out, m0, nil); err != nil { - t.Fatal(err) - } - m1, err := Decode(&buffer{buf: out.Bytes()}) - if err != nil { - t.Fatal(err) - } - compare(t, m0, m1) -} - -func benchmarkEncode(b *testing.B, name string, pixelSize int) { - img, err := openImage(name) - if err != nil { - b.Fatal(err) - } - s := img.Bounds().Size() - b.SetBytes(int64(s.X * s.Y * pixelSize)) - b.ResetTimer() - for i := 0; i < b.N; i++ { - Encode(ioutil.Discard, img, nil) - } -} - -func BenchmarkEncode(b *testing.B) { benchmarkEncode(b, "video-001.tiff", 4) } -func BenchmarkEncodePaletted(b *testing.B) { benchmarkEncode(b, "video-001-paletted.tiff", 1) } -func BenchmarkEncodeGray(b *testing.B) { benchmarkEncode(b, "video-001-gray.tiff", 1) } -func BenchmarkEncodeGray16(b *testing.B) { benchmarkEncode(b, "video-001-gray-16bit.tiff", 2) } -func BenchmarkEncodeRGBA(b *testing.B) { benchmarkEncode(b, "video-001.tiff", 4) } -func BenchmarkEncodeRGBA64(b *testing.B) { benchmarkEncode(b, "video-001-16bit.tiff", 8) } |