aaa

Hello Hugo

  1. aaa
  2. bbb
  3. ccc
// Copyright 2015 <chaishushan{AT}gmail.com>. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

// Package bigimg provides large image (1MBx1MB) support.
package bigimg

import (
	"image"
)

const (
	DefaultMaxOpenedFiles = 128
	DefaultMaxCachedFiles = 64
	DefaultTileSize       = 256      // 64/128/256/512/1024/2048/4096
	DefaultWebpQuality    = 90       // [0-100]
	DefaultWebpLossless   = false    // [0-100]
	DefaultCacheSize      = 64 << 20 // 64MB
)

type Interface interface {
	FileInfo() (info FileInfo)
	ImageSize() (width, height int)
	CoordSystem() (name string, x0, y0, dx, dy float64)

	PydLevels() int
	TilesAcross(level int) int
	TilesDown(level int) int
	TileSize() int

	GetTileImage(level, col, row int) (m image.Image, err error)
	GetTileImageEncoded(level, col, row int, mineType string) (data []byte, err error)
	GetTileImageEncodedEx(level, col, row int, mineType string, min, max float32) (data []byte, err error)

	ReadRectImage(level int, r image.Rectangle) (m image.Image, err error)
	ReadRectImageEncoded(level int, r image.Rectangle, mineType string) (data []byte, err error)
	ReadRectImageEncodedEx(level int, r image.Rectangle, mineType string, min, max float32) (data []byte, err error)

	WriteRectImage(level int, r image.Rectangle, m image.Image) (err error)
	WriteRectImageEncoded(level int, r image.Rectangle, data []byte) (err error)

	Close() error
}

补充

啊啊啊啊