Documentation ¶
Index ¶
- Constants
- Variables
- type ImageTK
- func (p *ImageTK) EncodePNG(imgA image.Image)
- func (p *ImageTK) EnlargeImage(src image.Image, scaleA float64) (image.Image, error)
- func (p *ImageTK) GetImageFileContent(fileNameA string, imageTypeA string) image.Image
- func (p *ImageTK) GetImageFileContentAndThumb(fileNameA string, maxWidthA uint, maxHeightA uint, imageTypeA string) image.Image
- func (p *ImageTK) GetVersion() string
- func (p *ImageTK) HQ2x(src *image.RGBA) (*image.RGBA, error)
- func (p *ImageTK) LoadImage(fileNameA string) (image.Image, error)
- func (p *ImageTK) LoadPlotImage(plt *plot.Plot, w vg.Length, h vg.Length) (*image.RGBA, error)
- func (p *ImageTK) LoadPlotImageInMemory(plotA *plot.Plot, w vg.Length, h vg.Length, formatA string) (*bytes.Buffer, error)
- func (p *ImageTK) LoadRGBAFromImage(imageA image.Image) (*image.RGBA, error)
- func (p *ImageTK) NewNRGBAFromHex(strA string) color.NRGBA
- func (p *ImageTK) NewNRGBAPFromHex(strA string) *color.NRGBA
- func (p *ImageTK) NewPlotXY(xA, yA float64) plotter.XY
- func (p *ImageTK) NewRGBA(r, g, b, a uint8) color.RGBA
- func (p *ImageTK) NewRGBAFromHex(strA string) color.RGBA
- func (p *ImageTK) NewRGBAP(r, g, b, a uint8) *color.RGBA
- func (p *ImageTK) NewRGBAPFromHex(strA string) *color.RGBA
- func (p *ImageTK) ParseHexColor(x string) (r, g, b, a int)
- func (p *ImageTK) ResizeImage(widthA, heightA int, img image.Image, interpA ...InterpolationFunction) image.Image
- func (p *ImageTK) SaveImageAs(imageA image.Image, filePathA string, formatA ...string) error
- func (p *ImageTK) Thumbnail(maxWidth, maxHeight uint, img image.Image, interp InterpolationFunction) image.Image
- type InterpolationFunction
Constants ¶
View Source
const ( TOP_LEFT = iota TOP TOP_RIGHT LEFT CENTER RIGHT BOTTOM_LEFT BOTTOM BOTTOM_RIGHT )
Variables ¶
View Source
var ITKX = &ImageTK{Version: versionG}
Functions ¶
This section is empty.
Types ¶
type ImageTK ¶
type ImageTK struct {
Version string
}
func NewImageTK ¶
func NewImageTK() *ImageTK
func (*ImageTK) EnlargeImage ¶
func (*ImageTK) GetImageFileContent ¶
func (*ImageTK) GetImageFileContentAndThumb ¶
func (*ImageTK) GetVersion ¶
func (*ImageTK) LoadPlotImage ¶
func (*ImageTK) LoadPlotImageInMemory ¶
func (p *ImageTK) LoadPlotImageInMemory(plotA *plot.Plot, w vg.Length, h vg.Length, formatA string) (*bytes.Buffer, error)
LoadPlotImageInMemory formatA support png, jpg...
func (*ImageTK) LoadRGBAFromImage ¶
func (*ImageTK) ParseHexColor ¶
ParseHexColor inspired by gg
func (*ImageTK) ResizeImage ¶
func (*ImageTK) SaveImageAs ¶
type InterpolationFunction ¶
type InterpolationFunction int
const ( // Nearest-neighbor interpolation NearestNeighbor InterpolationFunction = iota // Bilinear interpolation Bilinear // Bicubic interpolation (with cubic hermite spline) Bicubic // Mitchell-Netravali interpolation MitchellNetravali // Lanczos interpolation (a=2) Lanczos2 // Lanczos interpolation (a=3) Lanczos3 )
InterpolationFunction constants
Click to show internal directories.
Click to hide internal directories.