From 84d2482ddbff9564c9ad75b2d30af66e3ddfd44d Mon Sep 17 00:00:00 2001 From: Christopher Speller Date: Thu, 12 May 2016 15:08:58 -0400 Subject: Updating go depencancies. Switching to go1.6 vendoring (#2949) --- Godeps/_workspace/src/golang.org/x/image/LICENSE | 27 - Godeps/_workspace/src/golang.org/x/image/PATENTS | 22 - .../src/golang.org/x/image/bmp/reader.go | 199 --- .../src/golang.org/x/image/bmp/writer.go | 166 --- .../golang.org/x/image/font/basicfont/basicfont.go | 113 -- .../src/golang.org/x/image/font/basicfont/data.go | 1456 -------------------- .../src/golang.org/x/image/font/basicfont/gen.go | 115 -- .../_workspace/src/golang.org/x/image/font/font.go | 202 --- .../golang.org/x/image/font/plan9font/plan9font.go | 556 -------- .../src/golang.org/x/image/math/fixed/fixed.go | 172 --- .../src/golang.org/x/image/tiff/buffer.go | 69 - .../src/golang.org/x/image/tiff/compress.go | 58 - .../src/golang.org/x/image/tiff/consts.go | 133 -- .../src/golang.org/x/image/tiff/lzw/reader.go | 277 ---- .../src/golang.org/x/image/tiff/reader.go | 681 --------- .../src/golang.org/x/image/tiff/writer.go | 438 ------ 16 files changed, 4684 deletions(-) delete mode 100644 Godeps/_workspace/src/golang.org/x/image/LICENSE delete mode 100644 Godeps/_workspace/src/golang.org/x/image/PATENTS delete mode 100644 Godeps/_workspace/src/golang.org/x/image/bmp/reader.go delete mode 100644 Godeps/_workspace/src/golang.org/x/image/bmp/writer.go delete mode 100644 Godeps/_workspace/src/golang.org/x/image/font/basicfont/basicfont.go delete mode 100644 Godeps/_workspace/src/golang.org/x/image/font/basicfont/data.go delete mode 100644 Godeps/_workspace/src/golang.org/x/image/font/basicfont/gen.go delete mode 100644 Godeps/_workspace/src/golang.org/x/image/font/font.go delete mode 100644 Godeps/_workspace/src/golang.org/x/image/font/plan9font/plan9font.go delete mode 100644 Godeps/_workspace/src/golang.org/x/image/math/fixed/fixed.go delete mode 100644 Godeps/_workspace/src/golang.org/x/image/tiff/buffer.go delete mode 100644 Godeps/_workspace/src/golang.org/x/image/tiff/compress.go delete mode 100644 Godeps/_workspace/src/golang.org/x/image/tiff/consts.go delete mode 100644 Godeps/_workspace/src/golang.org/x/image/tiff/lzw/reader.go delete mode 100644 Godeps/_workspace/src/golang.org/x/image/tiff/reader.go delete mode 100644 Godeps/_workspace/src/golang.org/x/image/tiff/writer.go (limited to 'Godeps/_workspace/src/golang.org/x/image') diff --git a/Godeps/_workspace/src/golang.org/x/image/LICENSE b/Godeps/_workspace/src/golang.org/x/image/LICENSE deleted file mode 100644 index 6a66aea5e..000000000 --- a/Godeps/_workspace/src/golang.org/x/image/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -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 deleted file mode 100644 index 733099041..000000000 --- a/Godeps/_workspace/src/golang.org/x/image/PATENTS +++ /dev/null @@ -1,22 +0,0 @@ -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.go b/Godeps/_workspace/src/golang.org/x/image/bmp/reader.go deleted file mode 100644 index a48cba84d..000000000 --- a/Godeps/_workspace/src/golang.org/x/image/bmp/reader.go +++ /dev/null @@ -1,199 +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 bmp implements a BMP image decoder and encoder. -// -// The BMP specification is at http://www.digicamsoft.com/bmp/bmp.html. -package bmp - -import ( - "errors" - "image" - "image/color" - "io" -) - -// ErrUnsupported means that the input BMP image uses a valid but unsupported -// feature. -var ErrUnsupported = errors.New("bmp: unsupported BMP image") - -func readUint16(b []byte) uint16 { - return uint16(b[0]) | uint16(b[1])<<8 -} - -func readUint32(b []byte) uint32 { - return uint32(b[0]) | uint32(b[1])<<8 | uint32(b[2])<<16 | uint32(b[3])<<24 -} - -// decodePaletted reads an 8 bit-per-pixel BMP image from r. -// If topDown is false, the image rows will be read bottom-up. -func decodePaletted(r io.Reader, c image.Config, topDown bool) (image.Image, error) { - paletted := image.NewPaletted(image.Rect(0, 0, c.Width, c.Height), c.ColorModel.(color.Palette)) - if c.Width == 0 || c.Height == 0 { - return paletted, nil - } - var tmp [4]byte - y0, y1, yDelta := c.Height-1, -1, -1 - if topDown { - y0, y1, yDelta = 0, c.Height, +1 - } - for y := y0; y != y1; y += yDelta { - p := paletted.Pix[y*paletted.Stride : y*paletted.Stride+c.Width] - if _, err := io.ReadFull(r, p); err != nil { - return nil, err - } - // Each row is 4-byte aligned. - if c.Width%4 != 0 { - _, err := io.ReadFull(r, tmp[:4-c.Width%4]) - if err != nil { - return nil, err - } - } - } - return paletted, nil -} - -// decodeRGB reads a 24 bit-per-pixel BMP image from r. -// If topDown is false, the image rows will be read bottom-up. -func decodeRGB(r io.Reader, c image.Config, topDown bool) (image.Image, error) { - rgba := image.NewRGBA(image.Rect(0, 0, c.Width, c.Height)) - if c.Width == 0 || c.Height == 0 { - return rgba, nil - } - // There are 3 bytes per pixel, and each row is 4-byte aligned. - b := make([]byte, (3*c.Width+3)&^3) - y0, y1, yDelta := c.Height-1, -1, -1 - if topDown { - y0, y1, yDelta = 0, c.Height, +1 - } - for y := y0; y != y1; y += yDelta { - if _, err := io.ReadFull(r, b); err != nil { - return nil, err - } - p := rgba.Pix[y*rgba.Stride : y*rgba.Stride+c.Width*4] - for i, j := 0, 0; i < len(p); i, j = i+4, j+3 { - // BMP images are stored in BGR order rather than RGB order. - p[i+0] = b[j+2] - p[i+1] = b[j+1] - p[i+2] = b[j+0] - p[i+3] = 0xFF - } - } - return rgba, nil -} - -// decodeNRGBA reads a 32 bit-per-pixel BMP image from r. -// If topDown is false, the image rows will be read bottom-up. -func decodeNRGBA(r io.Reader, c image.Config, topDown bool) (image.Image, error) { - rgba := image.NewNRGBA(image.Rect(0, 0, c.Width, c.Height)) - if c.Width == 0 || c.Height == 0 { - return rgba, nil - } - y0, y1, yDelta := c.Height-1, -1, -1 - if topDown { - y0, y1, yDelta = 0, c.Height, +1 - } - for y := y0; y != y1; y += yDelta { - p := rgba.Pix[y*rgba.Stride : y*rgba.Stride+c.Width*4] - if _, err := io.ReadFull(r, p); err != nil { - return nil, err - } - for i := 0; i < len(p); i += 4 { - // BMP images are stored in BGRA order rather than RGBA order. - p[i+0], p[i+2] = p[i+2], p[i+0] - } - } - return rgba, nil -} - -// Decode reads a BMP image from r and returns it as an image.Image. -// Limitation: The file must be 8, 24 or 32 bits per pixel. -func Decode(r io.Reader) (image.Image, error) { - c, bpp, topDown, err := decodeConfig(r) - if err != nil { - return nil, err - } - switch bpp { - case 8: - return decodePaletted(r, c, topDown) - case 24: - return decodeRGB(r, c, topDown) - case 32: - return decodeNRGBA(r, c, topDown) - } - panic("unreachable") -} - -// DecodeConfig returns the color model and dimensions of a BMP image without -// decoding the entire image. -// Limitation: The file must be 8, 24 or 32 bits per pixel. -func DecodeConfig(r io.Reader) (image.Config, error) { - config, _, _, err := decodeConfig(r) - return config, err -} - -func decodeConfig(r io.Reader) (config image.Config, bitsPerPixel int, topDown bool, err error) { - // We only support those BMP images that are a BITMAPFILEHEADER - // immediately followed by a BITMAPINFOHEADER. - const ( - fileHeaderLen = 14 - infoHeaderLen = 40 - ) - var b [1024]byte - if _, err := io.ReadFull(r, b[:fileHeaderLen+infoHeaderLen]); err != nil { - return image.Config{}, 0, false, err - } - if string(b[:2]) != "BM" { - return image.Config{}, 0, false, errors.New("bmp: invalid format") - } - offset := readUint32(b[10:14]) - if readUint32(b[14:18]) != infoHeaderLen { - return image.Config{}, 0, false, ErrUnsupported - } - width := int(int32(readUint32(b[18:22]))) - height := int(int32(readUint32(b[22:26]))) - if height < 0 { - height, topDown = -height, true - } - if width < 0 || height < 0 { - return image.Config{}, 0, false, ErrUnsupported - } - // We only support 1 plane, 8 or 24 bits per pixel and no compression. - planes, bpp, compression := readUint16(b[26:28]), readUint16(b[28:30]), readUint32(b[30:34]) - if planes != 1 || compression != 0 { - return image.Config{}, 0, false, ErrUnsupported - } - switch bpp { - case 8: - if offset != fileHeaderLen+infoHeaderLen+256*4 { - return image.Config{}, 0, false, ErrUnsupported - } - _, err = io.ReadFull(r, b[:256*4]) - if err != nil { - return image.Config{}, 0, false, err - } - pcm := make(color.Palette, 256) - for i := range pcm { - // BMP images are stored in BGR order rather than RGB order. - // Every 4th byte is padding. - pcm[i] = color.RGBA{b[4*i+2], b[4*i+1], b[4*i+0], 0xFF} - } - return image.Config{ColorModel: pcm, Width: width, Height: height}, 8, topDown, nil - case 24: - if offset != fileHeaderLen+infoHeaderLen { - return image.Config{}, 0, false, ErrUnsupported - } - return image.Config{ColorModel: color.RGBAModel, Width: width, Height: height}, 24, topDown, nil - case 32: - if offset != fileHeaderLen+infoHeaderLen { - return image.Config{}, 0, false, ErrUnsupported - } - return image.Config{ColorModel: color.RGBAModel, Width: width, Height: height}, 32, topDown, nil - } - return image.Config{}, 0, false, ErrUnsupported -} - -func init() { - image.RegisterFormat("bmp", "BM????\x00\x00\x00\x00", Decode, DecodeConfig) -} diff --git a/Godeps/_workspace/src/golang.org/x/image/bmp/writer.go b/Godeps/_workspace/src/golang.org/x/image/bmp/writer.go deleted file mode 100644 index 6947968a4..000000000 --- a/Godeps/_workspace/src/golang.org/x/image/bmp/writer.go +++ /dev/null @@ -1,166 +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 ( - "encoding/binary" - "errors" - "image" - "io" -) - -type header struct { - sigBM [2]byte - fileSize uint32 - resverved [2]uint16 - pixOffset uint32 - dibHeaderSize uint32 - width uint32 - height uint32 - colorPlane uint16 - bpp uint16 - compression uint32 - imageSize uint32 - xPixelsPerMeter uint32 - yPixelsPerMeter uint32 - colorUse uint32 - colorImportant uint32 -} - -func encodePaletted(w io.Writer, pix []uint8, dx, dy, stride, step int) error { - var padding []byte - if dx < step { - padding = make([]byte, step-dx) - } - for y := dy - 1; y >= 0; y-- { - min := y*stride + 0 - max := y*stride + dx - if _, err := w.Write(pix[min:max]); err != nil { - return err - } - if padding != nil { - if _, err := w.Write(padding); err != nil { - return err - } - } - } - return nil -} - -func encodeRGBA(w io.Writer, pix []uint8, dx, dy, stride, step int) error { - buf := make([]byte, step) - for y := dy - 1; y >= 0; y-- { - min := y*stride + 0 - max := y*stride + dx*4 - off := 0 - for i := min; i < max; i += 4 { - buf[off+2] = pix[i+0] - buf[off+1] = pix[i+1] - buf[off+0] = pix[i+2] - off += 3 - } - if _, err := w.Write(buf); err != nil { - return err - } - } - return nil -} - -func encode(w io.Writer, m image.Image, step int) error { - b := m.Bounds() - buf := make([]byte, step) - for y := b.Max.Y - 1; y >= b.Min.Y; y-- { - off := 0 - for x := b.Min.X; x < b.Max.X; x++ { - r, g, b, _ := m.At(x, y).RGBA() - buf[off+2] = byte(r >> 8) - buf[off+1] = byte(g >> 8) - buf[off+0] = byte(b >> 8) - off += 3 - } - if _, err := w.Write(buf); err != nil { - return err - } - } - return nil -} - -// Encode writes the image m to w in BMP format. -func Encode(w io.Writer, m image.Image) error { - d := m.Bounds().Size() - if d.X < 0 || d.Y < 0 { - return errors.New("bmp: negative bounds") - } - h := &header{ - sigBM: [2]byte{'B', 'M'}, - fileSize: 14 + 40, - pixOffset: 14 + 40, - dibHeaderSize: 40, - width: uint32(d.X), - height: uint32(d.Y), - colorPlane: 1, - } - - var step int - var palette []byte - switch m := m.(type) { - case *image.Gray: - step = (d.X + 3) &^ 3 - palette = make([]byte, 1024) - for i := 0; i < 256; i++ { - palette[i*4+0] = uint8(i) - palette[i*4+1] = uint8(i) - palette[i*4+2] = uint8(i) - palette[i*4+3] = 0xFF - } - h.imageSize = uint32(d.Y * step) - h.fileSize += uint32(len(palette)) + h.imageSize - h.pixOffset += uint32(len(palette)) - h.bpp = 8 - - case *image.Paletted: - step = (d.X + 3) &^ 3 - palette = make([]byte, 1024) - for i := 0; i < len(m.Palette) && i < 256; i++ { - r, g, b, _ := m.Palette[i].RGBA() - palette[i*4+0] = uint8(b >> 8) - palette[i*4+1] = uint8(g >> 8) - palette[i*4+2] = uint8(r >> 8) - palette[i*4+3] = 0xFF - } - h.imageSize = uint32(d.Y * step) - h.fileSize += uint32(len(palette)) + h.imageSize - h.pixOffset += uint32(len(palette)) - h.bpp = 8 - default: - step = (3*d.X + 3) &^ 3 - h.imageSize = uint32(d.Y * step) - h.fileSize += h.imageSize - h.bpp = 24 - } - - if err := binary.Write(w, binary.LittleEndian, h); err != nil { - return err - } - if palette != nil { - if err := binary.Write(w, binary.LittleEndian, palette); err != nil { - return err - } - } - - if d.X == 0 || d.Y == 0 { - return nil - } - - switch m := m.(type) { - case *image.Gray: - return encodePaletted(w, m.Pix, d.X, d.Y, m.Stride, step) - case *image.Paletted: - return encodePaletted(w, m.Pix, d.X, d.Y, m.Stride, step) - case *image.RGBA: - return encodeRGBA(w, m.Pix, d.X, d.Y, m.Stride, step) - } - return encode(w, m, step) -} diff --git a/Godeps/_workspace/src/golang.org/x/image/font/basicfont/basicfont.go b/Godeps/_workspace/src/golang.org/x/image/font/basicfont/basicfont.go deleted file mode 100644 index 7eae19c8b..000000000 --- a/Godeps/_workspace/src/golang.org/x/image/font/basicfont/basicfont.go +++ /dev/null @@ -1,113 +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. - -//go:generate go run gen.go - -// Package basicfont provides fixed-size font faces. -package basicfont - -import ( - "image" - - "golang.org/x/image/math/fixed" -) - -// Range maps a contiguous range of runes to vertically adjacent sub-images of -// a Face's Mask image. The rune range is inclusive on the low end and -// exclusive on the high end. -// -// If Low <= r && r < High, then the rune r is mapped to the sub-image of -// Face.Mask whose bounds are image.Rect(0, y, Face.Width, y+Face.Height), -// where y equals (int(r-Low) + Offset) * Face.Height. -type Range struct { - Low, High rune - Offset int -} - -// Face7x13 is a Face derived from the public domain X11 misc-fixed font files. -// -// At the moment, it holds the printable characters in ASCII starting with -// space, and the Unicode replacement character U+FFFD. -// -// Its data is entirely self-contained and does not require loading from -// separate files. -var Face7x13 = &Face{ - Advance: 7, - Width: 6, - Height: 13, - Ascent: 11, - Mask: mask7x13, - Ranges: []Range{ - {'\u0020', '\u007f', 0}, - {'\ufffd', '\ufffe', 95}, - }, -} - -// Face is a basic font face whose glyphs all have the same metrics. -// -// It is safe to use concurrently. -type Face struct { - // Advance is the glyph advance, in pixels. - Advance int - // Width is the glyph width, in pixels. - Width int - // Height is the glyph height, in pixels. - Height int - // Ascent is the glyph ascent, in pixels. - Ascent int - - // TODO: do we also need Top and Left fields? - - // Mask contains all of the glyph masks. Its width is typically the Face's - // Width, and its height a multiple of the Face's Height. - Mask image.Image - // Ranges map runes to sub-images of Mask. The rune ranges must not - // overlap, and must be in increasing rune order. - Ranges []Range -} - -func (f *Face) Close() error { return nil } -func (f *Face) Kern(r0, r1 rune) fixed.Int26_6 { return 0 } - -func (f *Face) Glyph(dot fixed.Point26_6, r rune) ( - dr image.Rectangle, mask image.Image, maskp image.Point, advance fixed.Int26_6, ok bool) { - -loop: - for _, rr := range [2]rune{r, '\ufffd'} { - for _, rng := range f.Ranges { - if rr < rng.Low || rng.High <= rr { - continue - } - maskp.Y = (int(rr-rng.Low) + rng.Offset) * f.Height - ok = true - break loop - } - } - if !ok { - return image.Rectangle{}, nil, image.Point{}, 0, false - } - - minX := int(dot.X+32) >> 6 - minY := int(dot.Y+32)>>6 - f.Ascent - dr = image.Rectangle{ - Min: image.Point{ - X: minX, - Y: minY, - }, - Max: image.Point{ - X: minX + f.Width, - Y: minY + f.Height, - }, - } - - return dr, f.Mask, maskp, fixed.I(f.Advance), true -} - -func (f *Face) GlyphBounds(r rune) (bounds fixed.Rectangle26_6, advance fixed.Int26_6, ok bool) { - return fixed.R(0, -f.Ascent, f.Width, -f.Ascent+f.Height), fixed.I(f.Advance), true -} - -func (f *Face) GlyphAdvance(r rune) (advance fixed.Int26_6, ok bool) { - return fixed.I(f.Advance), true -} diff --git a/Godeps/_workspace/src/golang.org/x/image/font/basicfont/data.go b/Godeps/_workspace/src/golang.org/x/image/font/basicfont/data.go deleted file mode 100644 index 883532117..000000000 --- a/Godeps/_workspace/src/golang.org/x/image/font/basicfont/data.go +++ /dev/null @@ -1,1456 +0,0 @@ -// generated by go generate; DO NOT EDIT. - -package basicfont - -// This data is derived from files in the font/fixed directory of the Plan 9 -// Port source code (https://github.com/9fans/plan9port) which were originally -// based on the public domain X11 misc-fixed font files. - -import "image" - -// mask7x13 contains 96 6×13 glyphs in 7488 Pix bytes. -var mask7x13 = &image.Alpha{ - Stride: 6, - Rect: image.Rectangle{Max: image.Point{6, 96 * 13}}, - Pix: []byte{ - // 0x20 ' ' - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - - // 0x21 '!' - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - - // 0x22 '"' - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xff, 0x00, 0xff, 0x00, - 0x00, 0x00, 0xff, 0x00, 0xff, 0x00, - 0x00, 0x00, 0xff, 0x00, 0xff, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - - // 0x23 '#' - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xff, 0x00, 0xff, 0x00, - 0x00, 0x00, 0xff, 0x00, 0xff, 0x00, - 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, - 0x00, 0x00, 0xff, 0x00, 0xff, 0x00, - 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, - 0x00, 0x00, 0xff, 0x00, 0xff, 0x00, - 0x00, 0x00, 0xff, 0x00, 0xff, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - - // 0x24 '$' - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, - 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, - 0x00, 0xff, 0x00, 0xff, 0x00, 0x00, - 0x00, 0x00, 0xff, 0xff, 0xff, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x00, 0xff, - 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - - // 0x25 '%' - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x00, 0xff, 0x00, 0x00, 0xff, - 0x00, 0xff, 0x00, 0x00, 0xff, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, - 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, - 0x00, 0xff, 0x00, 0x00, 0xff, 0x00, - 0xff, 0x00, 0x00, 0xff, 0x00, 0xff, - 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - - // 0x26 '&' - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, - 0xff, 0x00, 0x00, 0xff, 0x00, 0x00, - 0xff, 0x00, 0x00, 0xff, 0x00, 0x00, - 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, - 0xff, 0x00, 0x00, 0xff, 0x00, 0xff, - 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, - 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - - // 0x27 '\'' - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - - // 0x28 '(' - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, - 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - - // 0x29 ')' - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, - 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - - // 0x2a '*' - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xff, 0x00, 0x00, 0xff, 0x00, - 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, - 0x00, 0xff, 0x00, 0x00, 0xff, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - - // 0x2b '+' - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, - 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, - 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - - // 0x2c ',' - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xff, 0xff, 0xff, 0x00, - 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, - 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - - // 0x2d '-' - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - - // 0x2e '.' - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, - 0x00, 0x00, 0xff, 0xff, 0xff, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - - // 0x2f '/' - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, - 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, - 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, - 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, - 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - - // 0x30 '0' - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, - 0x00, 0xff, 0x00, 0x00, 0xff, 0x00, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0x00, 0xff, 0x00, 0x00, 0xff, 0x00, - 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - - // 0x31 '1' - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, - 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, - 0x00, 0xff, 0x00, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, - 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - - // 0x32 '2' - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, - 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, - 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, - 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, - 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - - // 0x33 '3' - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, - 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, - 0x00, 0x00, 0xff, 0xff, 0xff, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, - 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - - // 0x34 '4' - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, - 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, - 0x00, 0x00, 0xff, 0x00, 0xff, 0x00, - 0x00, 0xff, 0x00, 0x00, 0xff, 0x00, - 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, - 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - - // 0x35 '5' - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, - 0xff, 0xff, 0x00, 0x00, 0x00, 0xff, - 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, - 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - - // 0x36 '6' - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xff, 0xff, 0xff, 0x00, - 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, - 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, - 0xff, 0xff, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - - // 0x37 '7' - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, - 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, - 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, - 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - - // 0x38 '8' - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - - // 0x39 '9' - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, - 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, - 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, - 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, - 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, - 0x00, 0xff, 0xff, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - - // 0x3a ':' - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, - 0x00, 0x00, 0xff, 0xff, 0xff, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, - 0x00, 0x00, 0xff, 0xff, 0xff, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - - // 0x3b ';' - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, - 0x00, 0x00, 0xff, 0xff, 0xff, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xff, 0xff, 0xff, 0x00, - 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, - 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - - // 0x3c '<' - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, - 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, - 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, - 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - - // 0x3d '=' - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - - // 0x3e '>' - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, - 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, - 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, - 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - - // 0x3f '?' - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, - 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - - // 0x40 '@' - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x00, 0x00, 0xff, 0xff, 0xff, - 0xff, 0x00, 0xff, 0x00, 0x00, 0xff, - 0xff, 0x00, 0xff, 0x00, 0xff, 0xff, - 0xff, 0x00, 0x00, 0xff, 0x00, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - - // 0x41 'A' - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, - 0x00, 0xff, 0x00, 0x00, 0xff, 0x00, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - - // 0x42 'B' - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, - 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, - 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, - 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, - 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, - 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, - 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, - 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - - // 0x43 'C' - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - - // 0x44 'D' - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, - 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, - 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, - 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, - 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, - 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, - 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, - 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - - // 0x45 'E' - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, - 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - - // 0x46 'F' - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, - 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - - // 0x47 'G' - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xff, 0x00, 0x00, 0xff, 0xff, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, - 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - - // 0x48 'H' - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - - // 0x49 'I' - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, - 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, - 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - - // 0x4a 'J' - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, - 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, - 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, - 0x00, 0xff, 0xff, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - - // 0x4b 'K' - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, - 0xff, 0x00, 0x00, 0xff, 0x00, 0x00, - 0xff, 0x00, 0xff, 0x00, 0x00, 0x00, - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, - 0xff, 0x00, 0xff, 0x00, 0x00, 0x00, - 0xff, 0x00, 0x00, 0xff, 0x00, 0x00, - 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - - // 0x4c 'L' - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - - // 0x4d 'M' - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, - 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - - // 0x4e 'N' - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0xff, 0xff, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x00, 0xff, 0x00, 0x00, 0xff, - 0xff, 0x00, 0x00, 0xff, 0x00, 0xff, - 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - - // 0x4f 'O' - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - - // 0x50 'P' - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, - 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - - // 0x51 'Q' - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x00, 0xff, 0x00, 0x00, 0xff, - 0xff, 0x00, 0x00, 0xff, 0x00, 0xff, - 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - - // 0x52 'R' - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, - 0xff, 0x00, 0xff, 0x00, 0x00, 0x00, - 0xff, 0x00, 0x00, 0xff, 0x00, 0x00, - 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - - // 0x53 'S' - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, - 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - - // 0x54 'T' - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, - 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - - // 0x55 'U' - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - - // 0x56 'V' - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0x00, 0xff, 0x00, 0x00, 0xff, 0x00, - 0x00, 0xff, 0x00, 0x00, 0xff, 0x00, - 0x00, 0xff, 0x00, 0x00, 0xff, 0x00, - 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, - 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, - 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - - // 0x57 'W' - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, - 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - - // 0x58 'X' - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0x00, 0xff, 0x00, 0x00, 0xff, 0x00, - 0x00, 0xff, 0x00, 0x00, 0xff, 0x00, - 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, - 0x00, 0xff, 0x00, 0x00, 0xff, 0x00, - 0x00, 0xff, 0x00, 0x00, 0xff, 0x00, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - - // 0x59 'Y' - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, - 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, - 0x00, 0x00, 0xff, 0x00, 0xff, 0x00, - 0x00, 0x00, 0xff, 0x00, 0xff, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - - // 0x5a 'Z' - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, - 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, - 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, - 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, - 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, - 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - - // 0x5b '[' - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, - 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - - // 0x5c '\\' - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, - 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - - // 0x5d ']' - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, - 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - - // 0x5e '^' - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, - 0x00, 0x00, 0xff, 0x00, 0xff, 0x00, - 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - - // 0x5f '_' - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - - // 0x60 '`' - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - - // 0x61 'a' - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, - 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, - 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - - // 0x62 'b' - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, - 0xff, 0xff, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0xff, 0xff, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - - // 0x63 'c' - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - - // 0x64 'd' - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, - 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, - 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, - 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, - 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - - // 0x65 'e' - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - - // 0x66 'f' - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xff, 0xff, 0xff, 0x00, - 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, - 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, - 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, - 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - - // 0x67 'g' - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, - 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, - 0x00, 0xff, 0xff, 0xff, 0x00, 0x00, - 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, - - // 0x68 'h' - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, - 0xff, 0xff, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - - // 0x69 'i' - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, - 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - - // 0x6a 'j' - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, - 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, - 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, - 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, - 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, - 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, - 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, - 0x00, 0x00, 0xff, 0xff, 0xff, 0x00, - - // 0x6b 'k' - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, - 0xff, 0x00, 0x00, 0xff, 0x00, 0x00, - 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, - 0xff, 0x00, 0x00, 0xff, 0x00, 0x00, - 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - - // 0x6c 'l' - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, - 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - - // 0x6d 'm' - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xff, 0xff, 0x00, 0xff, 0x00, - 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, - 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, - 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, - 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, - 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - - // 0x6e 'n' - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, - 0xff, 0xff, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - - // 0x6f 'o' - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - - // 0x70 'p' - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, - 0xff, 0xff, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0xff, 0xff, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, - 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, - - // 0x71 'q' - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, - 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, - 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, - 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, - 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, - - // 0x72 'r' - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, - 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, - 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - - // 0x73 's' - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - - // 0x74 't' - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, - 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, - 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, - 0x00, 0x00, 0xff, 0xff, 0xff, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - - // 0x75 'u' - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, - 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - - // 0x76 'v' - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, - 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, - 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, - 0x00, 0x00, 0xff, 0x00, 0xff, 0x00, - 0x00, 0x00, 0xff, 0x00, 0xff, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - - // 0x77 'w' - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, - 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, - 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, - 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, - 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, - 0x00, 0x00, 0xff, 0x00, 0xff, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - - // 0x78 'x' - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0x00, 0xff, 0x00, 0x00, 0xff, 0x00, - 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, - 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, - 0x00, 0xff, 0x00, 0x00, 0xff, 0x00, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - - // 0x79 'y' - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, - 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, - 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, - 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, - - // 0x7a 'z' - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, - 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, - 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - - // 0x7b '{' - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, - 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, - 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, - 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - - // 0x7c '|' - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - - // 0x7d '}' - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xff, 0xff, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, - 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, - 0x00, 0xff, 0xff, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - - // 0x7e '~' - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xff, 0x00, 0x00, 0xff, - 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, - 0x00, 0xff, 0x00, 0x00, 0xff, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - - // U+FFFD REPLACEMENT CHARACTER - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xff, 0xff, 0xff, 0x00, - 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, - 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, - 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, - 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, - 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, - 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, - 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, - 0x00, 0x00, 0xff, 0xff, 0xff, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - }, -} diff --git a/Godeps/_workspace/src/golang.org/x/image/font/basicfont/gen.go b/Godeps/_workspace/src/golang.org/x/image/font/basicfont/gen.go deleted file mode 100644 index 67a21a74a..000000000 --- a/Godeps/_workspace/src/golang.org/x/image/font/basicfont/gen.go +++ /dev/null @@ -1,115 +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. - -// +build ignore - -// This program generates data.go. -package main - -import ( - "bytes" - "fmt" - "go/format" - "image" - "image/draw" - "io/ioutil" - "log" - "path" - "path/filepath" - - "golang.org/x/image/font" - "golang.org/x/image/font/plan9font" - "golang.org/x/image/math/fixed" -) - -func main() { - // nGlyphs is the number of glyphs to generate: 95 characters in the range - // [0x20, 0x7e], plus the replacement character. - const nGlyphs = 95 + 1 - // The particular font (unicode.7x13.font) leaves the right-most column - // empty in its ASCII glyphs. We don't have to include that column in the - // generated glyphs, so we subtract one off the effective width. - const width, height, ascent = 7 - 1, 13, 11 - - 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.Fatalf("readFile: %v", err) - } - face, err := plan9font.ParseFont(fontData, readFile) - if err != nil { - log.Fatalf("plan9font.ParseFont: %v", err) - } - - dst := image.NewRGBA(image.Rect(0, 0, width, nGlyphs*height)) - draw.Draw(dst, dst.Bounds(), image.Black, image.Point{}, draw.Src) - d := &font.Drawer{ - Dst: dst, - Src: image.White, - Face: face, - } - for i := 0; i < nGlyphs; i++ { - r := '\ufffd' - if i < nGlyphs-1 { - r = 0x20 + rune(i) - } - d.Dot = fixed.P(0, height*i+ascent) - d.DrawString(string(r)) - } - - w := bytes.NewBuffer(nil) - w.WriteString(preamble) - fmt.Fprintf(w, "// mask7x13 contains %d %d×%d glyphs in %d Pix bytes.\n", nGlyphs, width, height, nGlyphs*width*height) - fmt.Fprintf(w, "var mask7x13 = &image.Alpha{\n") - fmt.Fprintf(w, " Stride: %d,\n", width) - fmt.Fprintf(w, " Rect: image.Rectangle{Max: image.Point{%d, %d*%d}},\n", width, nGlyphs, height) - fmt.Fprintf(w, " Pix: []byte{\n") - b := dst.Bounds() - for y := b.Min.Y; y < b.Max.Y; y++ { - if y%height == 0 { - if y != 0 { - w.WriteByte('\n') - } - i := y / height - if i < nGlyphs-1 { - i += 0x20 - fmt.Fprintf(w, "// %#2x %q\n", i, rune(i)) - } else { - fmt.Fprintf(w, "// U+FFFD REPLACEMENT CHARACTER\n") - } - } - - for x := b.Min.X; x < b.Max.X; x++ { - if dst.RGBAAt(x, y).R > 0 { - w.WriteString("0xff,") - } else { - w.WriteString("0x00,") - } - } - w.WriteByte('\n') - } - w.WriteString("},\n}\n") - - fmted, err := format.Source(w.Bytes()) - if err != nil { - log.Fatalf("format.Source: %v", err) - } - if err := ioutil.WriteFile("data.go", fmted, 0644); err != nil { - log.Fatalf("ioutil.WriteFile: %v", err) - } -} - -const preamble = `// generated by go generate; DO NOT EDIT. - -package basicfont - -// This data is derived from files in the font/fixed directory of the Plan 9 -// Port source code (https://github.com/9fans/plan9port) which were originally -// based on the public domain X11 misc-fixed font files. - -import "image" - -` diff --git a/Godeps/_workspace/src/golang.org/x/image/font/font.go b/Godeps/_workspace/src/golang.org/x/image/font/font.go deleted file mode 100644 index de8802fcc..000000000 --- a/Godeps/_workspace/src/golang.org/x/image/font/font.go +++ /dev/null @@ -1,202 +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 font defines an interface for font faces, for drawing text on an -// image. -// -// Other packages provide font face implementations. For example, a truetype -// package would provide one based on .ttf font files. -package font - -import ( - "image" - "image/draw" - "io" - - "golang.org/x/image/math/fixed" -) - -// TODO: who is responsible for caches (glyph images, glyph indices, kerns)? -// The Drawer or the Face? - -// Face is a font face. Its glyphs are often derived from a font file, such as -// "Comic_Sans_MS.ttf", but a face has a specific size, style, weight and -// hinting. For example, the 12pt and 18pt versions of Comic Sans are two -// different faces, even if derived from the same font file. -// -// A Face is not safe for concurrent use by multiple goroutines, as its methods -// may re-use implementation-specific caches and mask image buffers. -// -// To create a Face, look to other packages that implement specific font file -// formats. -type Face interface { - io.Closer - - // Glyph returns the draw.DrawMask parameters (dr, mask, maskp) to draw r's - // glyph at the sub-pixel destination location dot, and that glyph's - // advance width. - // - // It returns !ok if the face does not contain a glyph for r. - // - // The contents of the mask image returned by one Glyph call may change - // after the next Glyph call. Callers that want to cache the mask must make - // a copy. - Glyph(dot fixed.Point26_6, r rune) ( - dr image.Rectangle, mask image.Image, maskp image.Point, advance fixed.Int26_6, ok bool) - - // GlyphBounds returns the bounding box of r's glyph, drawn at a dot equal - // to the origin, and that glyph's advance width. - // - // It returns !ok if the face does not contain a glyph for r. - // - // The glyph's ascent and descent equal -bounds.Min.Y and +bounds.Max.Y. A - // visual depiction of what these metrics are is at - // https://developer.apple.com/library/mac/documentation/TextFonts/Conceptual/CocoaTextArchitecture/Art/glyph_metrics_2x.png - GlyphBounds(r rune) (bounds fixed.Rectangle26_6, advance fixed.Int26_6, ok bool) - - // GlyphAdvance returns the advance width of r's glyph. - // - // It returns !ok if the face does not contain a glyph for r. - GlyphAdvance(r rune) (advance fixed.Int26_6, ok bool) - - // Kern returns the horizontal adjustment for the kerning pair (r0, r1). A - // positive kern means to move the glyphs further apart. - Kern(r0, r1 rune) fixed.Int26_6 - - // TODO: per-font Metrics. - // TODO: ColoredGlyph for various emoji? - // TODO: Ligatures? Shaping? -} - -// TODO: Drawer.Layout or Drawer.Measure methods to measure text without -// drawing? - -// Drawer draws text on a destination image. -// -// A Drawer is not safe for concurrent use by multiple goroutines, since its -// Face is not. -type Drawer struct { - // Dst is the destination image. - Dst draw.Image - // Src is the source image. - Src image.Image - // Face provides the glyph mask images. - Face Face - // Dot is the baseline location to draw the next glyph. The majority of the - // affected pixels will be above and to the right of the dot, but some may - // be below or to the left. For example, drawing a 'j' in an italic face - // may affect pixels below and to the left of the dot. - Dot fixed.Point26_6 - - // TODO: Clip image.Image? - // TODO: SrcP image.Point for Src images other than *image.Uniform? How - // does it get updated during DrawString? -} - -// TODO: should DrawString return the last rune drawn, so the next DrawString -// call can kern beforehand? Or should that be the responsibility of the caller -// if they really want to do that, since they have to explicitly shift d.Dot -// anyway? -// -// In general, we'd have a DrawBytes([]byte) and DrawRuneReader(io.RuneReader) -// and the last case can't assume that you can rewind the stream. -// -// TODO: how does this work with line breaking: drawing text up until a -// vertical line? Should DrawString return the number of runes drawn? - -// DrawString draws s at the dot and advances the dot's location. -func (d *Drawer) DrawString(s string) { - var prevC rune - for i, c := range s { - if i != 0 { - d.Dot.X += d.Face.Kern(prevC, c) - } - dr, mask, maskp, advance, ok := d.Face.Glyph(d.Dot, c) - if !ok { - // TODO: is falling back on the U+FFFD glyph the responsibility of - // the Drawer or the Face? - // TODO: set prevC = '\ufffd'? - continue - } - draw.DrawMask(d.Dst, dr, d.Src, image.Point{}, mask, maskp, draw.Over) - d.Dot.X += advance - prevC = c - } -} - -// MeasureString returns how far dot would advance by drawing s. -func (d *Drawer) MeasureString(s string) (advance fixed.Int26_6) { - var prevC rune - for i, c := range s { - if i != 0 { - advance += d.Face.Kern(prevC, c) - } - a, ok := d.Face.GlyphAdvance(c) - if !ok { - // TODO: is falling back on the U+FFFD glyph the responsibility of - // the Drawer or the Face? - // TODO: set prevC = '\ufffd'? - continue - } - advance += a - prevC = c - } - return advance -} - -// Hinting selects how to quantize a vector font's glyph nodes. -// -// Not all fonts support hinting. -type Hinting int - -const ( - HintingNone Hinting = iota - HintingVertical - HintingFull -) - -// Stretch selects a normal, condensed, or expanded face. -// -// Not all fonts support stretches. -type Stretch int - -const ( - StretchUltraCondensed Stretch = -4 - StretchExtraCondensed Stretch = -3 - StretchCondensed Stretch = -2 - StretchSemiCondensed Stretch = -1 - StretchNormal Stretch = +0 - StretchSemiExpanded Stretch = +1 - StretchExpanded Stretch = +2 - StretchExtraExpanded Stretch = +3 - StretchUltraExpanded Stretch = +4 -) - -// Style selects a normal, italic, or oblique face. -// -// Not all fonts support styles. -type Style int - -const ( - StyleNormal Style = iota - StyleItalic - StyleOblique -) - -// Weight selects a normal, light or bold face. -// -// Not all fonts support weights. -type Weight int - -const ( - WeightThin Weight = 100 - WeightExtraLight Weight = 200 - WeightLight Weight = 300 - WeightNormal Weight = 400 - WeightMedium Weight = 500 - WeightSemiBold Weight = 600 - WeightBold Weight = 700 - WeightExtraBold Weight = 800 - WeightBlack Weight = 900 -) diff --git a/Godeps/_workspace/src/golang.org/x/image/font/plan9font/plan9font.go b/Godeps/_workspace/src/golang.org/x/image/font/plan9font/plan9font.go deleted file mode 100644 index 9c686b776..000000000 --- a/Godeps/_workspace/src/golang.org/x/image/font/plan9font/plan9font.go +++ /dev/null @@ -1,556 +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 implements font faces for the Plan 9 font and subfont file -// formats. These formats are described at -// http://plan9.bell-labs.com/magic/man2html/6/font -package plan9font - -// TODO: have a subface use an *image.Alpha instead of plan9Image implementing -// the image.Image interface? The image/draw code has a fast path for -// *image.Alpha masks. - -import ( - "bytes" - "errors" - "fmt" - "image" - "image/color" - "log" - "strconv" - "strings" - - "golang.org/x/image/font" - "golang.org/x/image/math/fixed" -) - -// fontchar describes one character glyph in a subfont. -// -// For more detail, look for "struct Fontchar" in -// http://plan9.bell-labs.com/magic/man2html/2/cachechars -type fontchar struct { - x uint32 // X position in the image holding the glyphs. - top uint8 // First non-zero scan line. - bottom uint8 // Last non-zero scan line. - left int8 // Offset of baseline. - width uint8 // Width of baseline. -} - -func parseFontchars(p []byte) []fontchar { - fc := make([]fontchar, len(p)/6) - for i := range fc { - fc[i] = fontchar{ - x: uint32(p[0]) | uint32(p[1])<<8, - top: uint8(p[2]), - bottom: uint8(p[3]), - left: int8(p[4]), - width: uint8(p[5]), - } - p = p[6:] - } - return fc -} - -// subface implements font.Face for a Plan 9 subfont. -type subface struct { - firstRune rune // First rune in the subfont. - n int // Number of characters in the subfont. - height int // Inter-line spacing. - ascent int // Height above the baseline. - fontchars []fontchar // Character descriptions. - img *plan9Image // Image holding the glyphs. -} - -func (f *subface) Close() error { return nil } -func (f *subface) Kern(r0, r1 rune) fixed.Int26_6 { return 0 } - -func (f *subface) Glyph(dot fixed.Point26_6, r rune) ( - dr image.Rectangle, mask image.Image, maskp image.Point, advance fixed.Int26_6, ok bool) { - - r -= f.firstRune - if r < 0 || f.n <= int(r) { - return image.Rectangle{}, nil, image.Point{}, 0, false - } - i := &f.fontchars[r+0] - j := &f.fontchars[r+1] - - minX := int(dot.X+32)>>6 + int(i.left) - minY := int(dot.Y+32)>>6 + int(i.top) - f.ascent - dr = image.Rectangle{ - Min: image.Point{ - X: minX, - Y: minY, - }, - Max: image.Point{ - X: minX + int(j.x-i.x), - Y: minY + int(i.bottom) - int(i.top), - }, - } - return dr, f.img, image.Point{int(i.x), int(i.top)}, fixed.Int26_6(i.width) << 6, true -} - -func (f *subface) GlyphBounds(r rune) (bounds fixed.Rectangle26_6, advance fixed.Int26_6, ok bool) { - r -= f.firstRune - if r < 0 || f.n <= int(r) { - return fixed.Rectangle26_6{}, 0, false - } - i := &f.fontchars[r+0] - j := &f.fontchars[r+1] - - bounds = fixed.R( - int(i.left), - int(i.top)-f.ascent, - int(i.left)+int(j.x-i.x), - int(i.bottom)-f.ascent, - ) - return bounds, fixed.Int26_6(i.width) << 6, true -} - -func (f *subface) GlyphAdvance(r rune) (advance fixed.Int26_6, ok bool) { - r -= f.firstRune - if r < 0 || f.n <= int(r) { - return 0, false - } - return fixed.Int26_6(f.fontchars[r].width) << 6, true -} - -// runeRange maps a single rune range [lo, hi] to a lazily loaded subface. Both -// ends of the range are inclusive. -type runeRange struct { - lo, hi rune - offset rune // subfont index that the lo rune maps to. - relFilename string - subface *subface - bad bool -} - -// face implements font.Face for a Plan 9 font. -// -// It maps multiple rune ranges to *subface values. Rune ranges may overlap; -// the first match wins. -type face struct { - height int - ascent int - readFile func(relFilename string) ([]byte, error) - runeRanges []runeRange -} - -func (f *face) Close() error { return nil } -func (f *face) Kern(r0, r1 rune) fixed.Int26_6 { return 0 } - -func (f *face) Glyph(dot fixed.Point26_6, r rune) ( - dr image.Rectangle, mask image.Image, maskp image.Point, advance fixed.Int26_6, ok bool) { - - if s, rr := f.subface(r); s != nil { - return s.Glyph(dot, rr) - } - return image.Rectangle{}, nil, image.Point{}, 0, false -} - -func (f *face) GlyphBounds(r rune) (bounds fixed.Rectangle26_6, advance fixed.Int26_6, ok bool) { - if s, rr := f.subface(r); s != nil { - return s.GlyphBounds(rr) - } - return fixed.Rectangle26_6{}, 0, false -} - -func (f *face) GlyphAdvance(r rune) (advance fixed.Int26_6, ok bool) { - if s, rr := f.subface(r); s != nil { - return s.GlyphAdvance(rr) - } - return 0, false -} - -func (f *face) subface(r rune) (*subface, rune) { - // Fall back on U+FFFD if we can't find r. - for _, rr := range [2]rune{r, '\ufffd'} { - // We have to do linear, not binary search. plan9port's - // lucsans/unicode.8.font says: - // 0x2591 0x2593 ../luc/Altshades.7.0 - // 0x2500 0x25ee ../luc/FormBlock.7.0 - // and the rune ranges overlap. - for i := range f.runeRanges { - x := &f.runeRanges[i] - if rr < x.lo || x.hi < rr || x.bad { - continue - } - if x.subface == nil { - data, err := f.readFile(x.relFilename) - if err != nil { - log.Printf("plan9font: couldn't read subfont %q: %v", x.relFilename, err) - x.bad = true - continue - } - sub, err := ParseSubfont(data, x.lo-x.offset) - if err != nil { - log.Printf("plan9font: couldn't parse subfont %q: %v", x.relFilename, err) - x.bad = true - continue - } - x.subface = sub.(*subface) - } - return x.subface, rr - } - } - return nil, 0 -} - -// ParseFont parses a Plan 9 font file. data is the contents of that font file, -// which gives relative filenames for subfont files. readFile returns the -// contents of those subfont files. It is similar to io/ioutil's ReadFile -// function, except that it takes a relative filename instead of an absolute -// one. -func ParseFont(data []byte, readFile func(relFilename string) ([]byte, error)) (font.Face, error) { - f := &face{ - readFile: readFile, - } - // TODO: don't use strconv, to avoid the conversions from []byte to string? - for first := true; len(data) > 0; first = false { - i := bytes.IndexByte(data, '\n') - if i < 0 { - return nil, errors.New("plan9font: invalid font: no final newline") - } - row := string(data[:i]) - data = data[i+1:] - if first { - height, s, ok := nextInt32(row) - if !ok { - return nil, fmt.Errorf("plan9font: invalid font: invalid header %q", row) - } - ascent, s, ok := nextInt32(s) - if !ok { - return nil, fmt.Errorf("plan9font: invalid font: invalid header %q", row) - } - if height < 0 || 0xffff < height || ascent < 0 || 0xffff < ascent { - return nil, fmt.Errorf("plan9font: invalid font: invalid header %q", row) - } - f.height, f.ascent = int(height), int(ascent) - continue - } - lo, s, ok := nextInt32(row) - if !ok { - return nil, fmt.Errorf("plan9font: invalid font: invalid row %q", row) - } - hi, s, ok := nextInt32(s) - if !ok { - return nil, fmt.Errorf("plan9font: invalid font: invalid row %q", row) - } - offset, s, _ := nextInt32(s) - - f.runeRanges = append(f.runeRanges, runeRange{ - lo: lo, - hi: hi, - offset: offset, - relFilename: s, - }) - } - return f, nil -} - -func nextInt32(s string) (ret int32, remaining string, ok bool) { - i := 0 - for ; i < len(s) && s[i] <= ' '; i++ { - } - j := i - for ; j < len(s) && s[j] > ' '; j++ { - } - n, err := strconv.ParseInt(s[i:j], 0, 32) - if err != nil { - return 0, s, false - } - for ; j < len(s) && s[j] <= ' '; j++ { - } - return int32(n), s[j:], true -} - -// ParseSubfont parses a Plan 9 subfont file. -// -// firstRune is the first rune in the subfont file. For example, the -// Phonetic.6.0 subfont, containing glyphs in the range U+0250 to U+02E9, would -// set firstRune to '\u0250'. -func ParseSubfont(data []byte, firstRune rune) (font.Face, error) { - data, m, err := parseImage(data) - if err != nil { - return nil, err - } - if len(data) < 3*12 { - return nil, errors.New("plan9font: invalid subfont: header too short") - } - n := atoi(data[0*12:]) - height := atoi(data[1*12:]) - ascent := atoi(data[2*12:]) - data = data[3*12:] - if len(data) != 6*(n+1) { - return nil, errors.New("plan9font: invalid subfont: data length mismatch") - } - return &subface{ - firstRune: firstRune, - n: n, - height: height, - ascent: ascent, - fontchars: parseFontchars(data), - img: m, - }, nil -} - -// plan9Image implements that subset of the Plan 9 image feature set that is -// used by this font file format. -// -// Some features, such as the repl bit and a clip rectangle, are omitted for -// simplicity. -type plan9Image struct { - depth int // Depth of the pixels in bits. - width int // Width in bytes of a single scan line. - rect image.Rectangle // Extent of the image. - pix []byte // Pixel bits. -} - -func (m *plan9Image) byteoffset(x, y int) int { - a := y * m.width - if m.depth < 8 { - // We need to always round down, but Go rounds toward zero. - np := 8 / m.depth - if x < 0 { - return a + (x-np+1)/np - } - return a + x/np - } - return a + x*(m.depth/8) -} - -func (m *plan9Image) Bounds() image.Rectangle { return m.rect } -func (m *plan9Image) ColorModel() color.Model { return color.AlphaModel } - -func (m *plan9Image) At(x, y int) color.Color { - if (image.Point{x, y}).In(m.rect) { - b := m.pix[m.byteoffset(x, y)] - switch m.depth { - case 1: - // CGrey, 1. - mask := uint8(1 << uint8(7-x&7)) - if (b & mask) != 0 { - return color.Alpha{0xff} - } - return color.Alpha{0x00} - case 2: - // CGrey, 2. - shift := uint(x&3) << 1 - // Place pixel at top of word. - y := b << shift - y &= 0xc0 - // Replicate throughout. - y |= y >> 2 - y |= y >> 4 - return color.Alpha{y} - } - } - return color.Alpha{0x00} -} - -var compressed = []byte("compressed\n") - -func parseImage(data []byte) (remainingData []byte, m *plan9Image, retErr error) { - if !bytes.HasPrefix(data, compressed) { - return nil, nil, errors.New("plan9font: unsupported uncompressed format") - } - data = data[len(compressed):] - - const hdrSize = 5 * 12 - if len(data) < hdrSize { - return nil, nil, errors.New("plan9font: invalid image: header too short") - } - hdr, data := data[:hdrSize], data[hdrSize:] - - // Distinguish new channel descriptor from old ldepth. Channel descriptors - // have letters as well as numbers, while ldepths are a single digit - // formatted as %-11d. - new := false - for m := 0; m < 10; m++ { - if hdr[m] != ' ' { - new = true - break - } - } - if hdr[11] != ' ' { - return nil, nil, errors.New("plan9font: invalid image: bad header") - } - if !new { - return nil, nil, errors.New("plan9font: unsupported ldepth format") - } - - depth := 0 - switch s := strings.TrimSpace(string(hdr[:1*12])); s { - default: - return nil, nil, fmt.Errorf("plan9font: unsupported pixel format %q", s) - case "k1": - depth = 1 - case "k2": - depth = 2 - } - r := ator(hdr[1*12:]) - if r.Min.X > r.Max.X || r.Min.Y > r.Max.Y { - return nil, nil, errors.New("plan9font: invalid image: bad rectangle") - } - - width := bytesPerLine(r, depth) - m = &plan9Image{ - depth: depth, - width: width, - rect: r, - pix: make([]byte, width*r.Dy()), - } - - miny := r.Min.Y - for miny != r.Max.Y { - if len(data) < 2*12 { - return nil, nil, errors.New("plan9font: invalid image: data band too short") - } - maxy := atoi(data[0*12:]) - nb := atoi(data[1*12:]) - data = data[2*12:] - - if len(data) < nb { - return nil, nil, errors.New("plan9font: invalid image: data band length mismatch") - } - buf := data[:nb] - data = data[nb:] - - if maxy <= miny || r.Max.Y < maxy { - return nil, nil, fmt.Errorf("plan9font: bad maxy %d", maxy) - } - // An old-format image would flip the bits here, but we don't support - // the old format. - rr := r - rr.Min.Y = miny - rr.Max.Y = maxy - if err := decompress(m, rr, buf); err != nil { - return nil, nil, err - } - miny = maxy - } - return data, m, nil -} - -// Compressed data are sequences of byte codes. If the first byte b has the -// 0x80 bit set, the next (b^0x80)+1 bytes are data. Otherwise, these two bytes -// specify a previous string to repeat. -const ( - compShortestMatch = 3 // shortest match possible. - compWindowSize = 1024 // window size. -) - -var ( - errDecompressBufferTooSmall = errors.New("plan9font: decompress: buffer too small") - errDecompressPhaseError = errors.New("plan9font: decompress: phase error") -) - -func decompress(m *plan9Image, r image.Rectangle, data []byte) error { - if !r.In(m.rect) { - return errors.New("plan9font: decompress: bad rectangle") - } - bpl := bytesPerLine(r, m.depth) - mem := make([]byte, compWindowSize) - memi := 0 - omemi := -1 - y := r.Min.Y - linei := m.byteoffset(r.Min.X, y) - eline := linei + bpl - datai := 0 - for { - if linei == eline { - y++ - if y == r.Max.Y { - break - } - linei = m.byteoffset(r.Min.X, y) - eline = linei + bpl - } - if datai == len(data) { - return errDecompressBufferTooSmall - } - c := data[datai] - datai++ - if c >= 128 { - for cnt := c - 128 + 1; cnt != 0; cnt-- { - if datai == len(data) { - return errDecompressBufferTooSmall - } - if linei == eline { - return errDecompressPhaseError - } - m.pix[linei] = data[datai] - linei++ - mem[memi] = data[datai] - memi++ - datai++ - if memi == len(mem) { - memi = 0 - } - } - } else { - if datai == len(data) { - return errDecompressBufferTooSmall - } - offs := int(data[datai]) + ((int(c) & 3) << 8) + 1 - datai++ - if memi < offs { - omemi = memi + (compWindowSize - offs) - } else { - omemi = memi - offs - } - for cnt := (c >> 2) + compShortestMatch; cnt != 0; cnt-- { - if linei == eline { - return errDecompressPhaseError - } - m.pix[linei] = mem[omemi] - linei++ - mem[memi] = mem[omemi] - memi++ - omemi++ - if omemi == len(mem) { - omemi = 0 - } - if memi == len(mem) { - memi = 0 - } - } - } - } - return nil -} - -func ator(b []byte) image.Rectangle { - return image.Rectangle{atop(b), atop(b[2*12:])} -} - -func atop(b []byte) image.Point { - return image.Pt(atoi(b), atoi(b[12:])) -} - -func atoi(b []byte) int { - i := 0 - for ; i < len(b) && b[i] == ' '; i++ { - } - n := 0 - for ; i < len(b) && '0' <= b[i] && b[i] <= '9'; i++ { - n = n*10 + int(b[i]) - '0' - } - return n -} - -func bytesPerLine(r image.Rectangle, depth int) int { - if depth <= 0 || 32 < depth { - panic("invalid depth") - } - var l int - if r.Min.X >= 0 { - l = (r.Max.X*depth + 7) / 8 - l -= (r.Min.X * depth) / 8 - } else { - // Make positive before divide. - t := (-r.Min.X*depth + 7) / 8 - l = t + (r.Max.X*depth+7)/8 - } - return l -} diff --git a/Godeps/_workspace/src/golang.org/x/image/math/fixed/fixed.go b/Godeps/_workspace/src/golang.org/x/image/math/fixed/fixed.go deleted file mode 100644 index 7af56d9ee..000000000 --- a/Godeps/_workspace/src/golang.org/x/image/math/fixed/fixed.go +++ /dev/null @@ -1,172 +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 implements fixed-point integer types. -package fixed - -import ( - "fmt" -) - -// TODO: implement fmt.Formatter for %f and %g. - -// I returns the integer value i as an Int26_6. -// -// For example, passing the integer value 2 yields Int26_6(128). -func I(i int) Int26_6 { - return Int26_6(i << 6) -} - -// Int26_6 is a signed 26.6 fixed-point number. -// -// The integer part ranges from -33554432 to 33554431, inclusive. The -// fractional part has 6 bits of precision. -// -// For example, the number one-and-a-quarter is Int26_6(1<<6 + 1<<4). -type Int26_6 int32 - -// String returns a human-readable representation of a 26.6 fixed-point number. -// -// For example, the number one-and-a-quarter becomes "1:16". -func (x Int26_6) String() string { - const shift, mask = 6, 1<<6 - 1 - if x >= 0 { - return fmt.Sprintf("%d:%02d", int32(x>>shift), int32(x&mask)) - } - x = -x - if x >= 0 { - return fmt.Sprintf("-%d:%02d", int32(x>>shift), int32(x&mask)) - } - return "-33554432:00" // The minimum value is -(1<<25). -} - -// Int52_12 is a signed 52.12 fixed-point number. -// -// The integer part ranges from -2251799813685248 to 2251799813685247, -// inclusive. The fractional part has 12 bits of precision. -// -// For example, the number one-and-a-quarter is Int52_12(1<<12 + 1<<10). -type Int52_12 int64 - -// String returns a human-readable representation of a 52.12 fixed-point -// number. -// -// For example, the number one-and-a-quarter becomes "1:1024". -func (x Int52_12) String() string { - const shift, mask = 12, 1<<12 - 1 - if x >= 0 { - return fmt.Sprintf("%d:%04d", int64(x>>shift), int64(x&mask)) - } - x = -x - if x >= 0 { - return fmt.Sprintf("-%d:%04d", int64(x>>shift), int64(x&mask)) - } - return "-2251799813685248:0000" // The minimum value is -(1<<51). -} - -// P returns the integer values x and y as a Point26_6. -// -// For example, passing the integer values (2, -3) yields Point26_6{128, -192}. -func P(x, y int) Point26_6 { - return Point26_6{Int26_6(x << 6), Int26_6(y << 6)} -} - -// Point26_6 is a 26.6 fixed-point coordinate pair. -// -// It is analogous to the image.Point type in the standard library. -type Point26_6 struct { - X, Y Int26_6 -} - -// Add returns the vector p+q. -func (p Point26_6) Add(q Point26_6) Point26_6 { - return Point26_6{p.X + q.X, p.Y + q.Y} -} - -// Sub returns the vector p-q. -func (p Point26_6) Sub(q Point26_6) Point26_6 { - return Point26_6{p.X - q.X, p.Y - q.Y} -} - -// Mul returns the vector p*k. -func (p Point26_6) Mul(k Int26_6) Point26_6 { - return Point26_6{p.X * k / 64, p.Y * k / 64} -} - -// Div returns the vector p/k. -func (p Point26_6) Div(k Int26_6) Point26_6 { - return Point26_6{p.X * 64 / k, p.Y * 64 / k} -} - -// Point52_12 is a 52.12 fixed-point coordinate pair. -// -// It is analogous to the image.Point type in the standard library. -type Point52_12 struct { - X, Y Int52_12 -} - -// Add returns the vector p+q. -func (p Point52_12) Add(q Point52_12) Point52_12 { - return Point52_12{p.X + q.X, p.Y + q.Y} -} - -// Sub returns the vector p-q. -func (p Point52_12) Sub(q Point52_12) Point52_12 { - return Point52_12{p.X - q.X, p.Y - q.Y} -} - -// Mul returns the vector p*k. -func (p Point52_12) Mul(k Int52_12) Point52_12 { - return Point52_12{p.X * k / 4096, p.Y * k / 4096} -} - -// Div returns the vector p/k. -func (p Point52_12) Div(k Int52_12) Point52_12 { - return Point52_12{p.X * 4096 / k, p.Y * 4096 / k} -} - -// R returns the integer values minX, minY, maxX, maxY as a Rectangle26_6. -// -// For example, passing the integer values (0, 1, 2, 3) yields -// Rectangle26_6{Point26_6{0, 64}, Point26_6{128, 192}}. -// -// Like the image.Rect function in the standard library, the returned rectangle -// has minimum and maximum coordinates swapped if necessary so that it is -// well-formed. -func R(minX, minY, maxX, maxY int) Rectangle26_6 { - if minX > maxX { - minX, maxX = maxX, minX - } - if minY > maxY { - minY, maxY = maxY, minY - } - return Rectangle26_6{ - Point26_6{ - Int26_6(minX << 6), - Int26_6(minY << 6), - }, - Point26_6{ - Int26_6(maxX << 6), - Int26_6(maxY << 6), - }, - } -} - -// Rectangle26_6 is a 26.6 fixed-point coordinate rectangle. The Min bound is -// inclusive and the Max bound is exclusive. It is well-formed if Min.X <= -// Max.X and likewise for Y. -// -// It is analogous to the image.Rectangle type in the standard library. -type Rectangle26_6 struct { - Min, Max Point26_6 -} - -// Rectangle52_12 is a 52.12 fixed-point coordinate rectangle. The Min bound is -// inclusive and the Max bound is exclusive. It is well-formed if Min.X <= -// Max.X and likewise for Y. -// -// It is analogous to the image.Rectangle type in the standard library. -type Rectangle52_12 struct { - Min, Max Point52_12 -} diff --git a/Godeps/_workspace/src/golang.org/x/image/tiff/buffer.go b/Godeps/_workspace/src/golang.org/x/image/tiff/buffer.go deleted file mode 100644 index d1801be48..000000000 --- a/Godeps/_workspace/src/golang.org/x/image/tiff/buffer.go +++ /dev/null @@ -1,69 +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" - -// buffer buffers an io.Reader to satisfy io.ReaderAt. -type buffer struct { - r io.Reader - buf []byte -} - -// fill reads data from b.r until the buffer contains at least end bytes. -func (b *buffer) fill(end int) error { - m := len(b.buf) - if end > m { - if end > cap(b.buf) { - newcap := 1024 - for newcap < end { - newcap *= 2 - } - newbuf := make([]byte, end, newcap) - copy(newbuf, b.buf) - b.buf = newbuf - } else { - b.buf = b.buf[:end] - } - if n, err := io.ReadFull(b.r, b.buf[m:end]); err != nil { - end = m + n - b.buf = b.buf[:end] - return err - } - } - return nil -} - -func (b *buffer) ReadAt(p []byte, off int64) (int, error) { - o := int(off) - end := o + len(p) - if int64(end) != off+int64(len(p)) { - return 0, io.ErrUnexpectedEOF - } - - err := b.fill(end) - return copy(p, b.buf[o:end]), err -} - -// Slice returns a slice of the underlying buffer. The slice contains -// n bytes starting at offset off. -func (b *buffer) Slice(off, n int) ([]byte, error) { - end := off + n - if err := b.fill(end); err != nil { - return nil, err - } - return b.buf[off:end], nil -} - -// newReaderAt converts an io.Reader into an io.ReaderAt. -func newReaderAt(r io.Reader) io.ReaderAt { - if ra, ok := r.(io.ReaderAt); ok { - return ra - } - return &buffer{ - r: r, - buf: make([]byte, 0, 1024), - } -} diff --git a/Godeps/_workspace/src/golang.org/x/image/tiff/compress.go b/Godeps/_workspace/src/golang.org/x/image/tiff/compress.go deleted file mode 100644 index 3f176f00a..000000000 --- a/Godeps/_workspace/src/golang.org/x/image/tiff/compress.go +++ /dev/null @@ -1,58 +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 ( - "bufio" - "io" -) - -type byteReader interface { - io.Reader - io.ByteReader -} - -// unpackBits decodes the PackBits-compressed data in src and returns the -// uncompressed data. -// -// The PackBits compression format is described in section 9 (p. 42) -// of the TIFF spec. -func unpackBits(r io.Reader) ([]byte, error) { - buf := make([]byte, 128) - dst := make([]byte, 0, 1024) - br, ok := r.(byteReader) - if !ok { - br = bufio.NewReader(r) - } - - for { - b, err := br.ReadByte() - if err != nil { - if err == io.EOF { - return dst, nil - } - return nil, err - } - code := int(int8(b)) - switch { - case code >= 0: - n, err := io.ReadFull(br, buf[:code+1]) - if err != nil { - return nil, err - } - dst = append(dst, buf[:n]...) - case code == -128: - // No-op. - default: - if b, err = br.ReadByte(); err != nil { - return nil, err - } - for j := 0; j < 1-code; j++ { - buf[j] = b - } - dst = append(dst, buf[:1-code]...) - } - } -} diff --git a/Godeps/_workspace/src/golang.org/x/image/tiff/consts.go b/Godeps/_workspace/src/golang.org/x/image/tiff/consts.go deleted file mode 100644 index 3c51a70be..000000000 --- a/Godeps/_workspace/src/golang.org/x/image/tiff/consts.go +++ /dev/null @@ -1,133 +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 - -// A tiff image file contains one or more images. The metadata -// of each image is contained in an Image File Directory (IFD), -// which contains entries of 12 bytes each and is described -// on page 14-16 of the specification. An IFD entry consists of -// -// - a tag, which describes the signification of the entry, -// - the data type and length of the entry, -// - the data itself or a pointer to it if it is more than 4 bytes. -// -// The presence of a length means that each IFD is effectively an array. - -const ( - leHeader = "II\x2A\x00" // Header for little-endian files. - beHeader = "MM\x00\x2A" // Header for big-endian files. - - ifdLen = 12 // Length of an IFD entry in bytes. -) - -// Data types (p. 14-16 of the spec). -const ( - dtByte = 1 - dtASCII = 2 - dtShort = 3 - dtLong = 4 - dtRational = 5 -) - -// The length of one instance of each data type in bytes. -var lengths = [...]uint32{0, 1, 1, 2, 4, 8} - -// Tags (see p. 28-41 of the spec). -const ( - tImageWidth = 256 - tImageLength = 257 - tBitsPerSample = 258 - tCompression = 259 - tPhotometricInterpretation = 262 - - tStripOffsets = 273 - tSamplesPerPixel = 277 - tRowsPerStrip = 278 - tStripByteCounts = 279 - - tTileWidth = 322 - tTileLength = 323 - tTileOffsets = 324 - tTileByteCounts = 325 - - tXResolution = 282 - tYResolution = 283 - tResolutionUnit = 296 - - tPredictor = 317 - tColorMap = 320 - tExtraSamples = 338 - tSampleFormat = 339 -) - -// Compression types (defined in various places in the spec and supplements). -const ( - cNone = 1 - cCCITT = 2 - cG3 = 3 // Group 3 Fax. - cG4 = 4 // Group 4 Fax. - cLZW = 5 - cJPEGOld = 6 // Superseded by cJPEG. - cJPEG = 7 - cDeflate = 8 // zlib compression. - cPackBits = 32773 - cDeflateOld = 32946 // Superseded by cDeflate. -) - -// Photometric interpretation values (see p. 37 of the spec). -const ( - pWhiteIsZero = 0 - pBlackIsZero = 1 - pRGB = 2 - pPaletted = 3 - pTransMask = 4 // transparency mask - pCMYK = 5 - pYCbCr = 6 - pCIELab = 8 -) - -// Values for the tPredictor tag (page 64-65 of the spec). -const ( - prNone = 1 - prHorizontal = 2 -) - -// Values for the tResolutionUnit tag (page 18). -const ( - resNone = 1 - resPerInch = 2 // Dots per inch. - resPerCM = 3 // Dots per centimeter. -) - -// imageMode represents the mode of the image. -type imageMode int - -const ( - mBilevel imageMode = iota - mPaletted - mGray - mGrayInvert - mRGB - mRGBA - mNRGBA -) - -// CompressionType describes the type of compression used in Options. -type CompressionType int - -const ( - Uncompressed CompressionType = iota - Deflate -) - -// specValue returns the compression type constant from the TIFF spec that -// is equivalent to c. -func (c CompressionType) specValue() uint32 { - switch c { - case Deflate: - return cDeflate - } - return cNone -} diff --git a/Godeps/_workspace/src/golang.org/x/image/tiff/lzw/reader.go b/Godeps/_workspace/src/golang.org/x/image/tiff/lzw/reader.go deleted file mode 100644 index dc9f7dd1d..000000000 --- a/Godeps/_workspace/src/golang.org/x/image/tiff/lzw/reader.go +++ /dev/null @@ -1,277 +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 lzw implements the Lempel-Ziv-Welch compressed data format, -// described in T. A. Welch, ``A Technique for High-Performance Data -// Compression'', Computer, 17(6) (June 1984), pp 8-19. -// -// In particular, it implements LZW as used by the TIFF file format, including -// an "off by one" algorithmic difference when compared to standard LZW. -package lzw - -/* -This file was branched from src/pkg/compress/lzw/reader.go in the -standard library. Differences from the original are marked with "NOTE". - -The tif_lzw.c file in the libtiff C library has this comment: - ----- -The 5.0 spec describes a different algorithm than Aldus -implements. Specifically, Aldus does code length transitions -one code earlier than should be done (for real LZW). -Earlier versions of this library implemented the correct -LZW algorithm, but emitted codes in a bit order opposite -to the TIFF spec. Thus, to maintain compatibility w/ Aldus -we interpret MSB-LSB ordered codes to be images written w/ -old versions of this library, but otherwise adhere to the -Aldus "off by one" algorithm. ----- - -The Go code doesn't read (invalid) TIFF files written by old versions of -libtiff, but the LZW algorithm in this package still differs from the one in -Go's standard package library to accomodate this "off by one" in valid TIFFs. -*/ - -import ( - "bufio" - "errors" - "fmt" - "io" -) - -// Order specifies the bit ordering in an LZW data stream. -type Order int - -const ( - // LSB means Least Significant Bits first, as used in the GIF file format. - LSB Order = iota - // MSB means Most Significant Bits first, as used in the TIFF and PDF - // file formats. - MSB -) - -const ( - maxWidth = 12 - decoderInvalidCode = 0xffff - flushBuffer = 1 << maxWidth -) - -// decoder is the state from which the readXxx method converts a byte -// stream into a code stream. -type decoder struct { - r io.ByteReader - bits uint32 - nBits uint - width uint - read func(*decoder) (uint16, error) // readLSB or readMSB - litWidth int // width in bits of literal codes - err error - - // The first 1<= 1<>= d.width - d.nBits -= d.width - return code, nil -} - -// readMSB returns the next code for "Most Significant Bits first" data. -func (d *decoder) readMSB() (uint16, error) { - for d.nBits < d.width { - x, err := d.r.ReadByte() - if err != nil { - return 0, err - } - d.bits |= uint32(x) << (24 - d.nBits) - d.nBits += 8 - } - code := uint16(d.bits >> (32 - d.width)) - d.bits <<= d.width - d.nBits -= d.width - return code, nil -} - -func (d *decoder) Read(b []byte) (int, error) { - for { - if len(d.toRead) > 0 { - n := copy(b, d.toRead) - d.toRead = d.toRead[n:] - return n, nil - } - if d.err != nil { - return 0, d.err - } - d.decode() - } -} - -// decode decompresses bytes from r and leaves them in d.toRead. -// read specifies how to decode bytes into codes. -// litWidth is the width in bits of literal codes. -func (d *decoder) decode() { - // Loop over the code stream, converting codes into decompressed bytes. - for { - code, err := d.read(d) - if err != nil { - if err == io.EOF { - err = io.ErrUnexpectedEOF - } - d.err = err - d.flush() - return - } - switch { - case code < d.clear: - // We have a literal code. - d.output[d.o] = uint8(code) - d.o++ - if d.last != decoderInvalidCode { - // Save what the hi code expands to. - d.suffix[d.hi] = uint8(code) - d.prefix[d.hi] = d.last - } - case code == d.clear: - d.width = 1 + uint(d.litWidth) - d.hi = d.eof - d.overflow = 1 << d.width - d.last = decoderInvalidCode - continue - case code == d.eof: - d.flush() - d.err = io.EOF - return - case code <= d.hi: - c, i := code, len(d.output)-1 - if code == d.hi { - // code == hi is a special case which expands to the last expansion - // followed by the head of the last expansion. To find the head, we walk - // the prefix chain until we find a literal code. - c = d.last - for c >= d.clear { - c = d.prefix[c] - } - d.output[i] = uint8(c) - i-- - c = d.last - } - // Copy the suffix chain into output and then write that to w. - for c >= d.clear { - d.output[i] = d.suffix[c] - i-- - c = d.prefix[c] - } - d.output[i] = uint8(c) - d.o += copy(d.output[d.o:], d.output[i:]) - if d.last != decoderInvalidCode { - // Save what the hi code expands to. - d.suffix[d.hi] = uint8(c) - d.prefix[d.hi] = d.last - } - default: - d.err = errors.New("lzw: invalid code") - d.flush() - return - } - d.last, d.hi = code, d.hi+1 - if d.hi+1 >= d.overflow { // NOTE: the "+1" is where TIFF's LZW differs from the standard algorithm. - if d.width == maxWidth { - d.last = decoderInvalidCode - } else { - d.width++ - d.overflow <<= 1 - } - } - if d.o >= flushBuffer { - d.flush() - return - } - } -} - -func (d *decoder) flush() { - d.toRead = d.output[:d.o] - d.o = 0 -} - -var errClosed = errors.New("lzw: reader/writer is closed") - -func (d *decoder) Close() error { - d.err = errClosed // in case any Reads come along - return nil -} - -// NewReader creates a new io.ReadCloser. -// Reads from the returned io.ReadCloser read and decompress data from r. -// If r does not also implement io.ByteReader, -// the decompressor may read more data than necessary from r. -// It is the caller's responsibility to call Close on the ReadCloser when -// finished reading. -// The number of bits to use for literal codes, litWidth, must be in the -// range [2,8] and is typically 8. It must equal the litWidth -// used during compression. -func NewReader(r io.Reader, order Order, litWidth int) io.ReadCloser { - d := new(decoder) - switch order { - case LSB: - d.read = (*decoder).readLSB - case MSB: - d.read = (*decoder).readMSB - default: - d.err = errors.New("lzw: unknown order") - return d - } - if litWidth < 2 || 8 < litWidth { - d.err = fmt.Errorf("lzw: litWidth %d out of range", litWidth) - return d - } - if br, ok := r.(io.ByteReader); ok { - d.r = br - } else { - d.r = bufio.NewReader(r) - } - d.litWidth = litWidth - d.width = 1 + uint(litWidth) - d.clear = uint16(1) << uint(litWidth) - d.eof, d.hi = d.clear+1, d.clear+1 - d.overflow = uint16(1) << d.width - d.last = decoderInvalidCode - - return d -} diff --git a/Godeps/_workspace/src/golang.org/x/image/tiff/reader.go b/Godeps/_workspace/src/golang.org/x/image/tiff/reader.go deleted file mode 100644 index 714e3dda7..000000000 --- a/Godeps/_workspace/src/golang.org/x/image/tiff/reader.go +++ /dev/null @@ -1,681 +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 implements a TIFF image decoder and encoder. -// -// The TIFF specification is at http://partners.adobe.com/public/developer/en/tiff/TIFF6.pdf -package tiff - -import ( - "compress/zlib" - "encoding/binary" - "fmt" - "image" - "image/color" - "io" - "io/ioutil" - "math" - - "golang.org/x/image/tiff/lzw" -) - -// A FormatError reports that the input is not a valid TIFF image. -type FormatError string - -func (e FormatError) Error() string { - return "tiff: invalid format: " + string(e) -} - -// An UnsupportedError reports that the input uses a valid but -// unimplemented feature. -type UnsupportedError string - -func (e UnsupportedError) Error() string { - return "tiff: unsupported feature: " + string(e) -} - -// An InternalError reports that an internal error was encountered. -type InternalError string - -func (e InternalError) Error() string { - return "tiff: internal error: " + string(e) -} - -var errNoPixels = FormatError("not enough pixel data") - -type decoder struct { - r io.ReaderAt - byteOrder binary.ByteOrder - config image.Config - mode imageMode - bpp uint - features map[int][]uint - palette []color.Color - - buf []byte - off int // Current offset in buf. - v uint32 // Buffer value for reading with arbitrary bit depths. - nbits uint // Remaining number of bits in v. -} - -// firstVal returns the first uint of the features entry with the given tag, -// or 0 if the tag does not exist. -func (d *decoder) firstVal(tag int) uint { - f := d.features[tag] - if len(f) == 0 { - return 0 - } - return f[0] -} - -// ifdUint decodes the IFD entry in p, which must be of the Byte, Short -// or Long type, and returns the decoded uint values. -func (d *decoder) ifdUint(p []byte) (u []uint, err error) { - var raw []byte - if len(p) < ifdLen { - return nil, FormatError("bad IFD entry") - } - - datatype := d.byteOrder.Uint16(p[2:4]) - if dt := int(datatype); dt <= 0 || dt >= len(lengths) { - return nil, UnsupportedError("IFD entry datatype") - } - - count := d.byteOrder.Uint32(p[4:8]) - if count > math.MaxInt32/lengths[datatype] { - return nil, FormatError("IFD data too large") - } - if datalen := lengths[datatype] * count; datalen > 4 { - // The IFD contains a pointer to the real value. - raw = make([]byte, datalen) - _, err = d.r.ReadAt(raw, int64(d.byteOrder.Uint32(p[8:12]))) - } else { - raw = p[8 : 8+datalen] - } - if err != nil { - return nil, err - } - - u = make([]uint, count) - switch datatype { - case dtByte: - for i := uint32(0); i < count; i++ { - u[i] = uint(raw[i]) - } - case dtShort: - for i := uint32(0); i < count; i++ { - u[i] = uint(d.byteOrder.Uint16(raw[2*i : 2*(i+1)])) - } - case dtLong: - for i := uint32(0); i < count; i++ { - u[i] = uint(d.byteOrder.Uint32(raw[4*i : 4*(i+1)])) - } - default: - return nil, UnsupportedError("data type") - } - return u, nil -} - -// parseIFD decides whether the the IFD entry in p is "interesting" and -// stows away the data in the decoder. -func (d *decoder) parseIFD(p []byte) error { - tag := d.byteOrder.Uint16(p[0:2]) - switch tag { - case tBitsPerSample, - tExtraSamples, - tPhotometricInterpretation, - tCompression, - tPredictor, - tStripOffsets, - tStripByteCounts, - tRowsPerStrip, - tTileWidth, - tTileLength, - tTileOffsets, - tTileByteCounts, - tImageLength, - tImageWidth: - val, err := d.ifdUint(p) - if err != nil { - return err - } - d.features[int(tag)] = val - case tColorMap: - val, err := d.ifdUint(p) - if err != nil { - return err - } - numcolors := len(val) / 3 - if len(val)%3 != 0 || numcolors <= 0 || numcolors > 256 { - return FormatError("bad ColorMap length") - } - d.palette = make([]color.Color, numcolors) - for i := 0; i < numcolors; i++ { - d.palette[i] = color.RGBA64{ - uint16(val[i]), - uint16(val[i+numcolors]), - uint16(val[i+2*numcolors]), - 0xffff, - } - } - case tSampleFormat: - // Page 27 of the spec: If the SampleFormat is present and - // the value is not 1 [= unsigned integer data], a Baseline - // TIFF reader that cannot handle the SampleFormat value - // must terminate the import process gracefully. - val, err := d.ifdUint(p) - if err != nil { - return err - } - for _, v := range val { - if v != 1 { - return UnsupportedError("sample format") - } - } - } - return nil -} - -// readBits reads n bits from the internal buffer starting at the current offset. -func (d *decoder) readBits(n uint) (v uint32, ok bool) { - for d.nbits < n { - d.v <<= 8 - if d.off >= len(d.buf) { - return 0, false - } - d.v |= uint32(d.buf[d.off]) - d.off++ - d.nbits += 8 - } - d.nbits -= n - rv := d.v >> d.nbits - d.v &^= rv << d.nbits - return rv, true -} - -// flushBits discards the unread bits in the buffer used by readBits. -// It is used at the end of a line. -func (d *decoder) flushBits() { - d.v = 0 - d.nbits = 0 -} - -// minInt returns the smaller of x or y. -func minInt(a, b int) int { - if a <= b { - return a - } - return b -} - -// decode decodes the raw data of an image. -// It reads from d.buf and writes the strip or tile into dst. -func (d *decoder) decode(dst image.Image, xmin, ymin, xmax, ymax int) error { - d.off = 0 - - // Apply horizontal predictor if necessary. - // In this case, p contains the color difference to the preceding pixel. - // See page 64-65 of the spec. - if d.firstVal(tPredictor) == prHorizontal { - switch d.bpp { - case 16: - var off int - n := 2 * len(d.features[tBitsPerSample]) // bytes per sample times samples per pixel - for y := ymin; y < ymax; y++ { - off += n - for x := 0; x < (xmax-xmin-1)*n; x += 2 { - if off+2 > len(d.buf) { - return errNoPixels - } - v0 := d.byteOrder.Uint16(d.buf[off-n : off-n+2]) - v1 := d.byteOrder.Uint16(d.buf[off : off+2]) - d.byteOrder.PutUint16(d.buf[off:off+2], v1+v0) - off += 2 - } - } - case 8: - var off int - n := 1 * len(d.features[tBitsPerSample]) // bytes per sample times samples per pixel - for y := ymin; y < ymax; y++ { - off += n - for x := 0; x < (xmax-xmin-1)*n; x++ { - if off >= len(d.buf) { - return errNoPixels - } - d.buf[off] += d.buf[off-n] - off++ - } - } - case 1: - return UnsupportedError("horizontal predictor with 1 BitsPerSample") - } - } - - rMaxX := minInt(xmax, dst.Bounds().Max.X) - rMaxY := minInt(ymax, dst.Bounds().Max.Y) - switch d.mode { - case mGray, mGrayInvert: - if d.bpp == 16 { - img := dst.(*image.Gray16) - for y := ymin; y < rMaxY; y++ { - for x := xmin; x < rMaxX; x++ { - if d.off+2 > len(d.buf) { - return errNoPixels - } - v := d.byteOrder.Uint16(d.buf[d.off : d.off+2]) - d.off += 2 - if d.mode == mGrayInvert { - v = 0xffff - v - } - img.SetGray16(x, y, color.Gray16{v}) - } - } - } else { - img := dst.(*image.Gray) - max := uint32((1 << d.bpp) - 1) - for y := ymin; y < rMaxY; y++ { - for x := xmin; x < rMaxX; x++ { - v, ok := d.readBits(d.bpp) - if !ok { - return errNoPixels - } - v = v * 0xff / max - if d.mode == mGrayInvert { - v = 0xff - v - } - img.SetGray(x, y, color.Gray{uint8(v)}) - } - d.flushBits() - } - } - case mPaletted: - img := dst.(*image.Paletted) - for y := ymin; y < rMaxY; y++ { - for x := xmin; x < rMaxX; x++ { - v, ok := d.readBits(d.bpp) - if !ok { - return errNoPixels - } - img.SetColorIndex(x, y, uint8(v)) - } - d.flushBits() - } - case mRGB: - if d.bpp == 16 { - img := dst.(*image.RGBA64) - for y := ymin; y < rMaxY; y++ { - for x := xmin; x < rMaxX; x++ { - if d.off+6 > len(d.buf) { - return errNoPixels - } - r := d.byteOrder.Uint16(d.buf[d.off+0 : d.off+2]) - g := d.byteOrder.Uint16(d.buf[d.off+2 : d.off+4]) - b := d.byteOrder.Uint16(d.buf[d.off+4 : d.off+6]) - d.off += 6 - img.SetRGBA64(x, y, color.RGBA64{r, g, b, 0xffff}) - } - } - } else { - img := dst.(*image.RGBA) - for y := ymin; y < rMaxY; y++ { - min := img.PixOffset(xmin, y) - max := img.PixOffset(rMaxX, y) - off := (y - ymin) * (xmax - xmin) * 3 - for i := min; i < max; i += 4 { - if off+3 > len(d.buf) { - return errNoPixels - } - img.Pix[i+0] = d.buf[off+0] - img.Pix[i+1] = d.buf[off+1] - img.Pix[i+2] = d.buf[off+2] - img.Pix[i+3] = 0xff - off += 3 - } - } - } - case mNRGBA: - if d.bpp == 16 { - img := dst.(*image.NRGBA64) - for y := ymin; y < rMaxY; y++ { - for x := xmin; x < rMaxX; x++ { - if d.off+8 > len(d.buf) { - return errNoPixels - } - r := d.byteOrder.Uint16(d.buf[d.off+0 : d.off+2]) - g := d.byteOrder.Uint16(d.buf[d.off+2 : d.off+4]) - b := d.byteOrder.Uint16(d.buf[d.off+4 : d.off+6]) - a := d.byteOrder.Uint16(d.buf[d.off+6 : d.off+8]) - d.off += 8 - img.SetNRGBA64(x, y, color.NRGBA64{r, g, b, a}) - } - } - } else { - img := dst.(*image.NRGBA) - for y := ymin; y < rMaxY; y++ { - min := img.PixOffset(xmin, y) - max := img.PixOffset(rMaxX, y) - i0, i1 := (y-ymin)*(xmax-xmin)*4, (y-ymin+1)*(xmax-xmin)*4 - if i1 > len(d.buf) { - return errNoPixels - } - copy(img.Pix[min:max], d.buf[i0:i1]) - } - } - case mRGBA: - if d.bpp == 16 { - img := dst.(*image.RGBA64) - for y := ymin; y < rMaxY; y++ { - for x := xmin; x < rMaxX; x++ { - if d.off+8 > len(d.buf) { - return errNoPixels - } - r := d.byteOrder.Uint16(d.buf[d.off+0 : d.off+2]) - g := d.byteOrder.Uint16(d.buf[d.off+2 : d.off+4]) - b := d.byteOrder.Uint16(d.buf[d.off+4 : d.off+6]) - a := d.byteOrder.Uint16(d.buf[d.off+6 : d.off+8]) - d.off += 8 - img.SetRGBA64(x, y, color.RGBA64{r, g, b, a}) - } - } - } else { - img := dst.(*image.RGBA) - for y := ymin; y < rMaxY; y++ { - min := img.PixOffset(xmin, y) - max := img.PixOffset(rMaxX, y) - i0, i1 := (y-ymin)*(xmax-xmin)*4, (y-ymin+1)*(xmax-xmin)*4 - if i1 > len(d.buf) { - return errNoPixels - } - copy(img.Pix[min:max], d.buf[i0:i1]) - } - } - } - - return nil -} - -func newDecoder(r io.Reader) (*decoder, error) { - d := &decoder{ - r: newReaderAt(r), - features: make(map[int][]uint), - } - - p := make([]byte, 8) - if _, err := d.r.ReadAt(p, 0); err != nil { - return nil, err - } - switch string(p[0:4]) { - case leHeader: - d.byteOrder = binary.LittleEndian - case beHeader: - d.byteOrder = binary.BigEndian - default: - return nil, FormatError("malformed header") - } - - ifdOffset := int64(d.byteOrder.Uint32(p[4:8])) - - // The first two bytes contain the number of entries (12 bytes each). - if _, err := d.r.ReadAt(p[0:2], ifdOffset); err != nil { - return nil, err - } - numItems := int(d.byteOrder.Uint16(p[0:2])) - - // All IFD entries are read in one chunk. - p = make([]byte, ifdLen*numItems) - if _, err := d.r.ReadAt(p, ifdOffset+2); err != nil { - return nil, err - } - - for i := 0; i < len(p); i += ifdLen { - if err := d.parseIFD(p[i : i+ifdLen]); err != nil { - return nil, err - } - } - - d.config.Width = int(d.firstVal(tImageWidth)) - d.config.Height = int(d.firstVal(tImageLength)) - - if _, ok := d.features[tBitsPerSample]; !ok { - return nil, FormatError("BitsPerSample tag missing") - } - d.bpp = d.firstVal(tBitsPerSample) - switch d.bpp { - case 0: - return nil, FormatError("BitsPerSample must not be 0") - case 1, 8, 16: - // Nothing to do, these are accepted by this implementation. - default: - return nil, UnsupportedError(fmt.Sprintf("BitsPerSample of %v", d.bpp)) - } - - // Determine the image mode. - switch d.firstVal(tPhotometricInterpretation) { - case pRGB: - if d.bpp == 16 { - for _, b := range d.features[tBitsPerSample] { - if b != 16 { - return nil, FormatError("wrong number of samples for 16bit RGB") - } - } - } else { - for _, b := range d.features[tBitsPerSample] { - if b != 8 { - return nil, FormatError("wrong number of samples for 8bit RGB") - } - } - } - // RGB images normally have 3 samples per pixel. - // If there are more, ExtraSamples (p. 31-32 of the spec) - // gives their meaning (usually an alpha channel). - // - // This implementation does not support extra samples - // of an unspecified type. - switch len(d.features[tBitsPerSample]) { - case 3: - d.mode = mRGB - if d.bpp == 16 { - d.config.ColorModel = color.RGBA64Model - } else { - d.config.ColorModel = color.RGBAModel - } - case 4: - switch d.firstVal(tExtraSamples) { - case 1: - d.mode = mRGBA - if d.bpp == 16 { - d.config.ColorModel = color.RGBA64Model - } else { - d.config.ColorModel = color.RGBAModel - } - case 2: - d.mode = mNRGBA - if d.bpp == 16 { - d.config.ColorModel = color.NRGBA64Model - } else { - d.config.ColorModel = color.NRGBAModel - } - default: - return nil, FormatError("wrong number of samples for RGB") - } - default: - return nil, FormatError("wrong number of samples for RGB") - } - case pPaletted: - d.mode = mPaletted - d.config.ColorModel = color.Palette(d.palette) - case pWhiteIsZero: - d.mode = mGrayInvert - if d.bpp == 16 { - d.config.ColorModel = color.Gray16Model - } else { - d.config.ColorModel = color.GrayModel - } - case pBlackIsZero: - d.mode = mGray - if d.bpp == 16 { - d.config.ColorModel = color.Gray16Model - } else { - d.config.ColorModel = color.GrayModel - } - default: - return nil, UnsupportedError("color model") - } - - return d, nil -} - -// DecodeConfig returns the color model and dimensions of a TIFF image without -// decoding the entire image. -func DecodeConfig(r io.Reader) (image.Config, error) { - d, err := newDecoder(r) - if err != nil { - return image.Config{}, err - } - return d.config, nil -} - -// Decode reads a TIFF image from r and returns it as an image.Image. -// The type of Image returned depends on the contents of the TIFF. -func Decode(r io.Reader) (img image.Image, err error) { - d, err := newDecoder(r) - if err != nil { - return - } - - blockPadding := false - blockWidth := d.config.Width - blockHeight := d.config.Height - blocksAcross := 1 - blocksDown := 1 - - if d.config.Width == 0 { - blocksAcross = 0 - } - if d.config.Height == 0 { - blocksDown = 0 - } - - var blockOffsets, blockCounts []uint - - if int(d.firstVal(tTileWidth)) != 0 { - blockPadding = true - - blockWidth = int(d.firstVal(tTileWidth)) - blockHeight = int(d.firstVal(tTileLength)) - - if blockWidth != 0 { - blocksAcross = (d.config.Width + blockWidth - 1) / blockWidth - } - if blockHeight != 0 { - blocksDown = (d.config.Height + blockHeight - 1) / blockHeight - } - - blockCounts = d.features[tTileByteCounts] - blockOffsets = d.features[tTileOffsets] - - } else { - if int(d.firstVal(tRowsPerStrip)) != 0 { - blockHeight = int(d.firstVal(tRowsPerStrip)) - } - - if blockHeight != 0 { - blocksDown = (d.config.Height + blockHeight - 1) / blockHeight - } - - blockOffsets = d.features[tStripOffsets] - blockCounts = d.features[tStripByteCounts] - } - - // Check if we have the right number of strips/tiles, offsets and counts. - if n := blocksAcross * blocksDown; len(blockOffsets) < n || len(blockCounts) < n { - return nil, FormatError("inconsistent header") - } - - imgRect := image.Rect(0, 0, d.config.Width, d.config.Height) - switch d.mode { - case mGray, mGrayInvert: - if d.bpp == 16 { - img = image.NewGray16(imgRect) - } else { - img = image.NewGray(imgRect) - } - case mPaletted: - img = image.NewPaletted(imgRect, d.palette) - case mNRGBA: - if d.bpp == 16 { - img = image.NewNRGBA64(imgRect) - } else { - img = image.NewNRGBA(imgRect) - } - case mRGB, mRGBA: - if d.bpp == 16 { - img = image.NewRGBA64(imgRect) - } else { - img = image.NewRGBA(imgRect) - } - } - - for i := 0; i < blocksAcross; i++ { - blkW := blockWidth - if !blockPadding && i == blocksAcross-1 && d.config.Width%blockWidth != 0 { - blkW = d.config.Width % blockWidth - } - for j := 0; j < blocksDown; j++ { - blkH := blockHeight - if !blockPadding && j == blocksDown-1 && d.config.Height%blockHeight != 0 { - blkH = d.config.Height % blockHeight - } - offset := int64(blockOffsets[j*blocksAcross+i]) - n := int64(blockCounts[j*blocksAcross+i]) - switch d.firstVal(tCompression) { - - // According to the spec, Compression does not have a default value, - // but some tools interpret a missing Compression value as none so we do - // the same. - case cNone, 0: - if b, ok := d.r.(*buffer); ok { - d.buf, err = b.Slice(int(offset), int(n)) - } else { - d.buf = make([]byte, n) - _, err = d.r.ReadAt(d.buf, offset) - } - case cLZW: - r := lzw.NewReader(io.NewSectionReader(d.r, offset, n), lzw.MSB, 8) - d.buf, err = ioutil.ReadAll(r) - r.Close() - case cDeflate, cDeflateOld: - var r io.ReadCloser - r, err = zlib.NewReader(io.NewSectionReader(d.r, offset, n)) - if err != nil { - return nil, err - } - d.buf, err = ioutil.ReadAll(r) - r.Close() - case cPackBits: - d.buf, err = unpackBits(io.NewSectionReader(d.r, offset, n)) - default: - err = UnsupportedError(fmt.Sprintf("compression value %d", d.firstVal(tCompression))) - } - if err != nil { - return nil, err - } - - xmin := i * blockWidth - ymin := j * blockHeight - xmax := xmin + blkW - ymax := ymin + blkH - err = d.decode(img, xmin, ymin, xmax, ymax) - if err != nil { - return nil, err - } - } - } - return -} - -func init() { - image.RegisterFormat("tiff", leHeader, Decode, DecodeConfig) - image.RegisterFormat("tiff", beHeader, Decode, DecodeConfig) -} diff --git a/Godeps/_workspace/src/golang.org/x/image/tiff/writer.go b/Godeps/_workspace/src/golang.org/x/image/tiff/writer.go deleted file mode 100644 index c8a01cea7..000000000 --- a/Godeps/_workspace/src/golang.org/x/image/tiff/writer.go +++ /dev/null @@ -1,438 +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" - "compress/zlib" - "encoding/binary" - "image" - "io" - "sort" -) - -// The TIFF format allows to choose the order of the different elements freely. -// The basic structure of a TIFF file written by this package is: -// -// 1. Header (8 bytes). -// 2. Image data. -// 3. Image File Directory (IFD). -// 4. "Pointer area" for larger entries in the IFD. - -// We only write little-endian TIFF files. -var enc = binary.LittleEndian - -// An ifdEntry is a single entry in an Image File Directory. -// A value of type dtRational is composed of two 32-bit values, -// thus data contains two uints (numerator and denominator) for a single number. -type ifdEntry struct { - tag int - datatype int - data []uint32 -} - -func (e ifdEntry) putData(p []byte) { - for _, d := range e.data { - switch e.datatype { - case dtByte, dtASCII: - p[0] = byte(d) - p = p[1:] - case dtShort: - enc.PutUint16(p, uint16(d)) - p = p[2:] - case dtLong, dtRational: - enc.PutUint32(p, uint32(d)) - p = p[4:] - } - } -} - -type byTag []ifdEntry - -func (d byTag) Len() int { return len(d) } -func (d byTag) Less(i, j int) bool { return d[i].tag < d[j].tag } -func (d byTag) Swap(i, j int) { d[i], d[j] = d[j], d[i] } - -func encodeGray(w io.Writer, pix []uint8, dx, dy, stride int, predictor bool) error { - if !predictor { - return writePix(w, pix, dy, dx, stride) - } - buf := make([]byte, dx) - for y := 0; y < dy; y++ { - min := y*stride + 0 - max := y*stride + dx - off := 0 - var v0 uint8 - for i := min; i < max; i++ { - v1 := pix[i] - buf[off] = v1 - v0 - v0 = v1 - off++ - } - if _, err := w.Write(buf); err != nil { - return err - } - } - return nil -} - -func encodeGray16(w io.Writer, pix []uint8, dx, dy, stride int, predictor bool) error { - buf := make([]byte, dx*2) - for y := 0; y < dy; y++ { - min := y*stride + 0 - max := y*stride + dx*2 - off := 0 - var v0 uint16 - for i := min; i < max; i += 2 { - // An image.Gray16's Pix is in big-endian order. - v1 := uint16(pix[i])<<8 | uint16(pix[i+1]) - if predictor { - v0, v1 = v1, v1-v0 - } - // We only write little-endian TIFF files. - buf[off+0] = byte(v1) - buf[off+1] = byte(v1 >> 8) - off += 2 - } - if _, err := w.Write(buf); err != nil { - return err - } - } - return nil -} - -func encodeRGBA(w io.Writer, pix []uint8, dx, dy, stride int, predictor bool) error { - if !predictor { - return writePix(w, pix, dy, dx*4, stride) - } - buf := make([]byte, dx*4) - for y := 0; y < dy; y++ { - min := y*stride + 0 - max := y*stride + dx*4 - off := 0 - var r0, g0, b0, a0 uint8 - for i := min; i < max; i += 4 { - r1, g1, b1, a1 := pix[i+0], pix[i+1], pix[i+2], pix[i+3] - buf[off+0] = r1 - r0 - buf[off+1] = g1 - g0 - buf[off+2] = b1 - b0 - buf[off+3] = a1 - a0 - off += 4 - r0, g0, b0, a0 = r1, g1, b1, a1 - } - if _, err := w.Write(buf); err != nil { - return err - } - } - return nil -} - -func encodeRGBA64(w io.Writer, pix []uint8, dx, dy, stride int, predictor bool) error { - buf := make([]byte, dx*8) - for y := 0; y < dy; y++ { - min := y*stride + 0 - max := y*stride + dx*8 - off := 0 - var r0, g0, b0, a0 uint16 - for i := min; i < max; i += 8 { - // An image.RGBA64's Pix is in big-endian order. - r1 := uint16(pix[i+0])<<8 | uint16(pix[i+1]) - g1 := uint16(pix[i+2])<<8 | uint16(pix[i+3]) - b1 := uint16(pix[i+4])<<8 | uint16(pix[i+5]) - a1 := uint16(pix[i+6])<<8 | uint16(pix[i+7]) - if predictor { - r0, r1 = r1, r1-r0 - g0, g1 = g1, g1-g0 - b0, b1 = b1, b1-b0 - a0, a1 = a1, a1-a0 - } - // We only write little-endian TIFF files. - buf[off+0] = byte(r1) - buf[off+1] = byte(r1 >> 8) - buf[off+2] = byte(g1) - buf[off+3] = byte(g1 >> 8) - buf[off+4] = byte(b1) - buf[off+5] = byte(b1 >> 8) - buf[off+6] = byte(a1) - buf[off+7] = byte(a1 >> 8) - off += 8 - } - if _, err := w.Write(buf); err != nil { - return err - } - } - return nil -} - -func encode(w io.Writer, m image.Image, predictor bool) error { - bounds := m.Bounds() - buf := make([]byte, 4*bounds.Dx()) - for y := bounds.Min.Y; y < bounds.Max.Y; y++ { - off := 0 - if predictor { - var r0, g0, b0, a0 uint8 - for x := bounds.Min.X; x < bounds.Max.X; x++ { - r, g, b, a := m.At(x, y).RGBA() - r1 := uint8(r >> 8) - g1 := uint8(g >> 8) - b1 := uint8(b >> 8) - a1 := uint8(a >> 8) - buf[off+0] = r1 - r0 - buf[off+1] = g1 - g0 - buf[off+2] = b1 - b0 - buf[off+3] = a1 - a0 - off += 4 - r0, g0, b0, a0 = r1, g1, b1, a1 - } - } else { - for x := bounds.Min.X; x < bounds.Max.X; x++ { - r, g, b, a := m.At(x, y).RGBA() - buf[off+0] = uint8(r >> 8) - buf[off+1] = uint8(g >> 8) - buf[off+2] = uint8(b >> 8) - buf[off+3] = uint8(a >> 8) - off += 4 - } - } - if _, err := w.Write(buf); err != nil { - return err - } - } - return nil -} - -// writePix writes the internal byte array of an image to w. It is less general -// but much faster then encode. writePix is used when pix directly -// corresponds to one of the TIFF image types. -func writePix(w io.Writer, pix []byte, nrows, length, stride int) error { - if length == stride { - _, err := w.Write(pix[:nrows*length]) - return err - } - for ; nrows > 0; nrows-- { - if _, err := w.Write(pix[:length]); err != nil { - return err - } - pix = pix[stride:] - } - return nil -} - -func writeIFD(w io.Writer, ifdOffset int, d []ifdEntry) error { - var buf [ifdLen]byte - // Make space for "pointer area" containing IFD entry data - // longer than 4 bytes. - parea := make([]byte, 1024) - pstart := ifdOffset + ifdLen*len(d) + 6 - var o int // Current offset in parea. - - // The IFD has to be written with the tags in ascending order. - sort.Sort(byTag(d)) - - // Write the number of entries in this IFD. - if err := binary.Write(w, enc, uint16(len(d))); err != nil { - return err - } - for _, ent := range d { - enc.PutUint16(buf[0:2], uint16(ent.tag)) - enc.PutUint16(buf[2:4], uint16(ent.datatype)) - count := uint32(len(ent.data)) - if ent.datatype == dtRational { - count /= 2 - } - enc.PutUint32(buf[4:8], count) - datalen := int(count * lengths[ent.datatype]) - if datalen <= 4 { - ent.putData(buf[8:12]) - } else { - if (o + datalen) > len(parea) { - newlen := len(parea) + 1024 - for (o + datalen) > newlen { - newlen += 1024 - } - newarea := make([]byte, newlen) - copy(newarea, parea) - parea = newarea - } - ent.putData(parea[o : o+datalen]) - enc.PutUint32(buf[8:12], uint32(pstart+o)) - o += datalen - } - if _, err := w.Write(buf[:]); err != nil { - return err - } - } - // The IFD ends with the offset of the next IFD in the file, - // or zero if it is the last one (page 14). - if err := binary.Write(w, enc, uint32(0)); err != nil { - return err - } - _, err := w.Write(parea[:o]) - return err -} - -// Options are the encoding parameters. -type Options struct { - // Compression is the type of compression used. - Compression CompressionType - // Predictor determines whether a differencing predictor is used; - // if true, instead of each pixel's color, the color difference to the - // preceding one is saved. This improves the compression for certain - // types of images and compressors. For example, it works well for - // photos with Deflate compression. - Predictor bool -} - -// Encode writes the image m to w. opt determines the options used for -// encoding, such as the compression type. If opt is nil, an uncompressed -// image is written. -func Encode(w io.Writer, m image.Image, opt *Options) error { - d := m.Bounds().Size() - - compression := uint32(cNone) - predictor := false - if opt != nil { - compression = opt.Compression.specValue() - // The predictor field is only used with LZW. See page 64 of the spec. - predictor = opt.Predictor && compression == cLZW - } - - _, err := io.WriteString(w, leHeader) - if err != nil { - return err - } - - // Compressed data is written into a buffer first, so that we - // know the compressed size. - var buf bytes.Buffer - // dst holds the destination for the pixel data of the image -- - // either w or a writer to buf. - var dst io.Writer - // imageLen is the length of the pixel data in bytes. - // The offset of the IFD is imageLen + 8 header bytes. - var imageLen int - - switch compression { - case cNone: - dst = w - // Write IFD offset before outputting pixel data. - switch m.(type) { - case *image.Paletted: - imageLen = d.X * d.Y * 1 - case *image.Gray: - imageLen = d.X * d.Y * 1 - case *image.Gray16: - imageLen = d.X * d.Y * 2 - case *image.RGBA64: - imageLen = d.X * d.Y * 8 - case *image.NRGBA64: - imageLen = d.X * d.Y * 8 - default: - imageLen = d.X * d.Y * 4 - } - err = binary.Write(w, enc, uint32(imageLen+8)) - if err != nil { - return err - } - case cDeflate: - dst = zlib.NewWriter(&buf) - } - - pr := uint32(prNone) - photometricInterpretation := uint32(pRGB) - samplesPerPixel := uint32(4) - bitsPerSample := []uint32{8, 8, 8, 8} - extraSamples := uint32(0) - colorMap := []uint32{} - - if predictor { - pr = prHorizontal - } - switch m := m.(type) { - case *image.Paletted: - photometricInterpretation = pPaletted - samplesPerPixel = 1 - bitsPerSample = []uint32{8} - colorMap = make([]uint32, 256*3) - for i := 0; i < 256 && i < len(m.Palette); i++ { - r, g, b, _ := m.Palette[i].RGBA() - colorMap[i+0*256] = uint32(r) - colorMap[i+1*256] = uint32(g) - colorMap[i+2*256] = uint32(b) - } - err = encodeGray(dst, m.Pix, d.X, d.Y, m.Stride, predictor) - case *image.Gray: - photometricInterpretation = pBlackIsZero - samplesPerPixel = 1 - bitsPerSample = []uint32{8} - err = encodeGray(dst, m.Pix, d.X, d.Y, m.Stride, predictor) - case *image.Gray16: - photometricInterpretation = pBlackIsZero - samplesPerPixel = 1 - bitsPerSample = []uint32{16} - err = encodeGray16(dst, m.Pix, d.X, d.Y, m.Stride, predictor) - case *image.NRGBA: - extraSamples = 2 // Unassociated alpha. - err = encodeRGBA(dst, m.Pix, d.X, d.Y, m.Stride, predictor) - case *image.NRGBA64: - extraSamples = 2 // Unassociated alpha. - bitsPerSample = []uint32{16, 16, 16, 16} - err = encodeRGBA64(dst, m.Pix, d.X, d.Y, m.Stride, predictor) - case *image.RGBA: - extraSamples = 1 // Associated alpha. - err = encodeRGBA(dst, m.Pix, d.X, d.Y, m.Stride, predictor) - case *image.RGBA64: - extraSamples = 1 // Associated alpha. - bitsPerSample = []uint32{16, 16, 16, 16} - err = encodeRGBA64(dst, m.Pix, d.X, d.Y, m.Stride, predictor) - default: - extraSamples = 1 // Associated alpha. - err = encode(dst, m, predictor) - } - if err != nil { - return err - } - - if compression != cNone { - if err = dst.(io.Closer).Close(); err != nil { - return err - } - imageLen = buf.Len() - if err = binary.Write(w, enc, uint32(imageLen+8)); err != nil { - return err - } - if _, err = buf.WriteTo(w); err != nil { - return err - } - } - - ifd := []ifdEntry{ - {tImageWidth, dtShort, []uint32{uint32(d.X)}}, - {tImageLength, dtShort, []uint32{uint32(d.Y)}}, - {tBitsPerSample, dtShort, bitsPerSample}, - {tCompression, dtShort, []uint32{compression}}, - {tPhotometricInterpretation, dtShort, []uint32{photometricInterpretation}}, - {tStripOffsets, dtLong, []uint32{8}}, - {tSamplesPerPixel, dtShort, []uint32{samplesPerPixel}}, - {tRowsPerStrip, dtShort, []uint32{uint32(d.Y)}}, - {tStripByteCounts, dtLong, []uint32{uint32(imageLen)}}, - // There is currently no support for storing the image - // resolution, so give a bogus value of 72x72 dpi. - {tXResolution, dtRational, []uint32{72, 1}}, - {tYResolution, dtRational, []uint32{72, 1}}, - {tResolutionUnit, dtShort, []uint32{resPerInch}}, - } - if pr != prNone { - ifd = append(ifd, ifdEntry{tPredictor, dtShort, []uint32{pr}}) - } - if len(colorMap) != 0 { - ifd = append(ifd, ifdEntry{tColorMap, dtShort, colorMap}) - } - if extraSamples > 0 { - ifd = append(ifd, ifdEntry{tExtraSamples, dtShort, []uint32{extraSamples}}) - } - - return writeIFD(w, imageLen+8, ifd) -} -- cgit v1.2.3-1-g7c22