Documentation ¶
Index ¶
Constants ¶
View Source
const ( MIME_TYPE_JPEG = "image/jpeg" MIME_TYPE_PNG = "image/png" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Image ¶
Image is a struct
func NewImageFromLocation ¶
NewImageFromLocation return an image from location
func NewImageFromReader ¶
NewImageFromReader return an image from Reader
type NoOpTransformation ¶
type NoOpTransformation struct { }
NoOpTransformation is a no-op transformation
func NewNoOpTransformation ¶
func NewNoOpTransformation() NoOpTransformation
NoOpTransformation return an instance of WaterMarkProcessing
func (NoOpTransformation) Apply ¶
func (p NoOpTransformation) Apply(image *Image) Result
Apply is a NoOpTransformation apply method
type RelativePosition ¶
type RelativePosition int
RelativePosition
const ( // TopLeft is relative from top-left TopLeft RelativePosition = iota // TopRight is relative from top-right TopRight // BottomLeft is relative from bottom-left BottomLeft // BottomRight is relative from bottom-right BottomRight )
type Transformation ¶
Transformation is a transformation interface
type WaterMarkProcessing ¶
type WaterMarkProcessing struct { //WaterMark is a watermark image WaterMark *Image //RelativePosition where the watermark image being positioned RelativePosition RelativePosition //Margin is a margin information used in accordance with the RelativePosition Margin Margin //ResizePercentage is resize percentage being applied to watermark image ResizePercentage Resize }
WaterMarkProcessing is a class that can be used for applying watermark
func NewWaterMarkProcessing ¶
func NewWaterMarkProcessing(watermark *Image) WaterMarkProcessing
NewWaterMarkProcessing return an instance of WaterMarkProcessing
func (WaterMarkProcessing) Apply ¶
func (p WaterMarkProcessing) Apply(img *Image) Result
Apply is a waterMarkProcessing apply method
Click to show internal directories.
Click to hide internal directories.