graphicsmagick

package
v0.0.0-...-0345585 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 5, 2014 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package graphicsmagick provides a GraphicsMagick Image Processor

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GraphicsMagickProcessor

type GraphicsMagickProcessor struct {
	Executable string // path to "gm" executable, usually "/usr/bin/gm"

	Timeout        time.Duration // timeout for process, optional
	TempDir        string        // temp directory for image files, optional
	AllowedFormats []string      // allowed format list, optional
}

GraphicsMagickProcessor represents a GraphicsMagick Image Processor

func (*GraphicsMagickProcessor) Process

func (processor *GraphicsMagickProcessor) Process(image *imageserver.Image, parameters imageserver.Parameters) (*imageserver.Image, error)

Process processes Image with the GraphicsMagick command line (mogrify command)

All parameters are extracted from the "graphicsmagick" node parameter and are optionals.

See GraphicsMagick documentation for more information about arguments.

Parameters

- width / height: sizes for "-resize" argument (both optionals)

- fill: "^" for "-resize" argument

- ignore_ratio: "!" for "-resize" argument

- only_shrink_larger: ">" for "-resize" argument

- only_enlarge_smaller: "<" for "-resize" argument

- background: color for "-background" argument, 3/4/6/8 lower case hexadecimal characters

- extent: "-extent" parameter, uses width/height parameters and add "-gravity center" argument

- format: "-format" parameter

- quality: "-quality" parameter

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL