Documentation ¶
Overview ¶
Package Go DZI Generator is a pure Go implementation of `vips dzsave`.
Index ¶
- func ComputeTileRect(opt *Option, col, row, maxCol, maxRow uint) (rect image.Rectangle)
- func Generate(m *image.NRGBA, opt *Option) error
- func GetLevelGrids(level, width, height, tileSize uint) (uint, uint)
- func GetMaxLevel(width, height uint) uint
- func SaveTile(dirPath string, level, col, row uint, format ImageFormat, m *image.NRGBA, ...) error
- type ImageFormat
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ComputeTileRect ¶
ComputeTileRect computes and returns corresponding rectangle based on given option, column and row.
func Generate ¶
Generate generates DZI files of given image and option. Width and height in option and image should be same.
func GetLevelGrids ¶
GetLevelGrids returns columns and rows number of current level, tile size, width and height.
func GetMaxLevel ¶
GetMaxLevel computes and returns the maximum level of DZI files based on given width and height.
Types ¶
type ImageFormat ¶
type ImageFormat string
const ( JPEG ImageFormat = "jpeg" PNG ImageFormat = "png" )
Click to show internal directories.
Click to hide internal directories.