public class GMOperation
extends org.im4java.core.GMOperation
Modifier and Type | Class and Description |
---|---|
static class |
GMOperation.GeometryAnnotation
Options which modify the behavior of the 'width X height' specification for geometry-based settings.
|
static class |
GMOperation.Gravity
Used in conjunction with other settings, generally defines how to interpret the offset for geometry-based
options.
|
static class |
GMOperation.RotationAnnotation
Options which modify the behavior of the 'degrees' specification for rotation-based settings.
|
Constructor and Description |
---|
GMOperation() |
Modifier and Type | Method and Description |
---|---|
GMOperation |
addImage(File file)
Add image to operation.
|
GMOperation |
addRawArg(String arg)
Add raw text to the list of arguments.
|
GMOperation |
drawText(String text,
int offsetX,
int offsetY)
Draws text overlay on image with the upper-right corner defined by the
offsetX and offsetY
parameters. |
GMOperation |
font(String style,
int size,
String color)
Defines font for text overlay.
|
GMOperation |
gravity(GMOperation.Gravity value)
Defines the gravity for geometry-based operations.
|
GMOperation |
grayscale(int depth)
Convert the image to grayscale (i.e.
|
GMOperation |
limitThreads(int threadsPerProcess)
Limits the number of threads used by the GraphicsMagick process during execution.
|
GMOperation |
quality(double quality)
Add option -quality to the GraphicsMagick commandline (see the documentation of GraphicsMagick for details).
|
GMOperation |
resize(int width,
int height,
Collection<GMOperation.GeometryAnnotation> annotations)
Resize source to desired target dimensions, using default resizing filter algorithm.
|
GMOperation |
rotate(double degrees,
GMOperation.RotationAnnotation annotation)
Rotates the image, with empty triangles back-filled using default background color.
|
GMOperation |
scale(int width,
int height,
Collection<GMOperation.GeometryAnnotation> annotations)
Scale source to desired target dimensions, using simplified resizing algorithm with pixel averaging.
|
GMOperation |
source(File file,
Integer width,
Integer height)
Specifies the source image to convert.
|
GMOperation |
stripProfiles()
Strips out ICC profiles.
|
adjoin, affine, affine, affine, affine, affine, affine, affine, antialias, append, authenticate, authenticate, average, backdrop, background, background, blackThreshold, blackThreshold, blackThreshold, bluePrimary, bluePrimary, bluePrimary, blur, blur, blur, border, border, border, bordercolor, bordercolor, borderwidth, borderwidth, borderwidth, borderwidth, borderwidth, borderwidth, box, box, channel, channel, charcoal, charcoal, chop, chop, chop, chop, chop, chop, clip, clippath, coalesce, colorize, colorize, colorize, colorize, colors, colors, colorspace, colorspace, comment, comment, compress, compress, contrast, convolve, convolve, convolve, convolve, convolve, convolve, convolve, convolve, convolve, convolve, convolve, convolve, convolve, convolve, convolve, convolve, convolve, crop, crop, crop, crop, crop, crop, cycle, cycle, debug, debug, deconstruct, define, define, delay, delay, delay, delay, density, density, density, depth, depth, despeckle, display, display, display, display, dispose, dispose, dither, dither, draw, draw, edge, edge, emboss, emboss, encoding, encoding, endian, endian, enhance, equalize, fill, fill, filter, filter, flatten, flip, flop, font, font, frame, frame, frame, frame, frame, fuzz, fuzz, fuzz, gamma, gamma, gaussian, gaussian, gaussian, geometry, geometry, geometry, geometry, geometry, gravity, gravity, greenPrimary, greenPrimary, greenPrimary, help, implode, implode, intent, intent, interlace, interlace, label, label, lat, lat, lat, lat, lat, level, level, level, level, level, limit, limit, list, list, log, log, loop, loop, map, map, mask, mask, matte, median, median, modulate, modulate, modulate, modulate, monitor, monochrome, morph, morph, mosaic, motionBlur, motionBlur, motionBlur, motionBlur, negate, noise, noise, noop, normalize, opaque, opaque, operator, operator, operator, operator, operator, orderedDither, orderedDither, orderedDither, outputDirectory, outputDirectory, p_adjoin, p_antialias, p_append, p_borderwidth, p_compress, p_contrast, p_debug, p_define, p_define, p_dither, p_endian, p_frame, p_gamma, p_gamma, p_label, p_map, p_mask, p_matte, p_negate, p_noise, p_noise, p_page, p_ping, p_profile, p_profile, p_progress, p_raise, p_raise, p_raise, p_remap, p_render, p_shade, p_shade, p_shade, p_write, p_write, page, page, page, page, page, page, paint, paint, pause, pause, pen, pen, ping, pointsize, pointsize, preview, preview, process, process, profile, profile, quality, quality, raise, raise, raise, randomThreshold, randomThreshold, randomThreshold, randomThreshold, redPrimary, redPrimary, redPrimary, region, region, region, region, region, render, resample, resample, resample, resize, resize, resize, resize, roll, roll, roll, rotate, rotate, rotate, sample, sample, sample, sample, sample, samplingFactor, samplingFactor, samplingFactor, scale, scale, scale, scale, scale, scene, scene, seed, segment, segment, segment, set, set, set, shade, shade, shade, sharpen, sharpen, sharpen, shave, shave, shave, shave, shear, shear, shear, size, size, size, size, solarize, solarize, spread, spread, stroke, stroke, strokewidth, strokewidth, swirl, swirl, texture, texture, threshold, threshold, threshold, tile, tile, transform, transparent, transparent, treedepth, treedepth, trim, type, type, undercolor, undercolor, units, units, unsharp, unsharp, unsharp, unsharp, unsharp, verbose, version, view, view, virtualPixel, virtualPixel, wave, wave, wave, whitePoint, whitePoint, whitePoint, whiteThreshold, whiteThreshold, whiteThreshold, write, write
public GMOperation limitThreads(int threadsPerProcess)
threadsPerProcess
- Number of threads to use per process.public GMOperation resize(int width, int height, Collection<GMOperation.GeometryAnnotation> annotations)
width
- Length in pixels of the target image's width.height
- Length in pixels of the target image's height.annotations
- Geometry annotations to define how the width
and height
options are to be interpreted.public GMOperation scale(int width, int height, Collection<GMOperation.GeometryAnnotation> annotations)
width
- Length in pixels of the target image's width.height
- Length in pixels of the target image's height.annotations
- Geometry annotations to define how the width
and height
options are to be interpreted.public GMOperation rotate(double degrees, GMOperation.RotationAnnotation annotation)
degrees
- The angle by which the image should be rotated. Positive numbers indicate clockwise direction;
negative numbers indicate counterclockwise direction.annotation
- Rotate annotation to define when rotation should happen.public GMOperation gravity(GMOperation.Gravity value)
value
- Gravity value to use, defining the coordinate system to use.public GMOperation grayscale(int depth)
depth
- the depth of the grayscalepublic GMOperation stripProfiles()
public GMOperation font(String style, int size, String color)
style
- Text font style (system-dependent based on installed fonts).size
- Text point size.color
- Text color, either named or #RGB
variant.public GMOperation drawText(String text, int offsetX, int offsetY)
offsetX
and offsetY
parameters. Note that will affect how the offset values are interpreted.text
- Text to write.offsetX
- Offset value in the horizontal direction.offsetY
- Offset value in the vertical direction.public GMOperation source(File file, @CheckForNull Integer width, @CheckForNull Integer height) throws IOException
file
- Source image file to convert.width
- Length in pixels of the source image's width; if null
or negative, the in-memory size
definition is omitted. Optional.height
- Length in pixels of the source image's height; if null
or negative, the in-memory size
definition is omitted. Optional.IOException
- when the source file does not exist.public GMOperation addImage(File file)
file
- image file to be added.public GMOperation addRawArg(String arg)
arg
- argument to addpublic GMOperation quality(double quality)
quality
- the quality of the image from 0 - 100Copyright © 2013. All Rights Reserved.