class Vips::MutableImage

Defined in:

vips/ext/mutableimage.cr
vips/mutableimage.cr

Instance Method Summary

Instance methods inherited from class Vips::Image

!=(other) !=, %(other) %, &(other) &, *(other) *, **(exp : Image)
**(exp : Array(Number))
**(*exp : Number)
**
, +(other) +, -(other) -, /(other) /, <(other) <, <<(other) <<, <=(other) <=, ==(other) ==, >(other) >, >=(other) >=, >>(other) >>, [](x : Int32, y : Int32)
[](i : Int32)
[](index : Range)
[]
, ^(other) ^, |(other) |, a_cosh : Image a_cosh, a_sinh : Image a_sinh, a_tan2(x : Image) a_tan2, a_tanh : Image a_tanh, abs abs, acos : Image acos, add(right : Image) add, add_alpha : Image add_alpha, affine(matrix : Array(Float64), **kwargs) affine, asin : Image asin, atan : Image atan, autorot autorot, avg avg, band_exists?(i : Int32) band_exists?, bandand bandand, bandbool(boolean : Enums::OperationBoolean) bandbool, bandeor bandeor, bandfold(**kwargs) bandfold, bandjoin(arr : Array(Int32)) : Image
bandjoin(arr : Array(Float64)) : Image
bandjoin(arr : Array(Image)) : Image
bandjoin(*arr : Float64) : Image
bandjoin(*arr : Int32) : Image
bandjoin(*arr : Image) : Image
bandjoin(*arr : Image | Number) : Image
bandjoin
, bandjoin_const(c : Array(Float64)) bandjoin_const, bandmean bandmean, bandor bandor, bandrank(*vals : Float64, **kwargs)
bandrank(*vals : Int32, **kwargs)
bandrank(*vals : Image, **kwargs)
bandrank(*vals, **kwargs)
bandrank
, bands : Int32 bands, bandsplit : Array(Image) bandsplit, bandunfold(**kwargs) bandunfold, boolean(right : Image, boolean : Enums::OperationBoolean) boolean, boolean_const(boolean : Enums::OperationBoolean, c : Array(Float64)) boolean_const, buildlut buildlut, byteswap byteswap, cache(**kwargs) cache, canny(**kwargs) canny, case(*args : Float64) : Image
case(*args : Int32) : Image
case(*images : Image) : Image
case(*args) : Image
case
, cast(format : Enums::BandFormat, **kwargs) cast, ceil : Image ceil, cmc2lch cmc2lch, cmyk2xyz cmyk2xyz, coding : Enums::Coding coding, colourspace(space : Enums::Interpretation, **kwargs) colourspace, compass(mask : Image, **kwargs) compass, complex(cmplx : Enums::OperationComplex) complex, complex2(right : Image, cmplx : Enums::OperationComplex2) complex2, complexform(right : Image) complexform, complexget(get : Enums::OperationComplexget) complexget, composite(images : Array(Image), modes : Array(Enums::BlendMode), **kwargs)
composite(image : Image, mode : Enums::BlendMode, **kwargs)
composite
, composite2(overlay : Image, mode : Enums::BlendMode, **kwargs) composite2, conj : Image conj, contains(name : String) contains, conv(mask : Image, **kwargs) conv, conva(mask : Image, **kwargs) conva, convasep(mask : Image, **kwargs) convasep, convf(mask : Image) convf, convi(mask : Image) convi, convsep(mask : Image, **kwargs) convsep, copy(**kwargs) copy, copy_memory copy_memory, cos : Image cos, cosh : Image cosh, countlines(direction : Enums::Direction) countlines, crop(left : Int32, top : Int32, width : Int32, height : Int32) crop, csvsave(filename : String, **kwargs) csvsave, csvsave_stream(stream : IO, **kwargs) csvsave_stream, csvsave_target(target : Target, **kwargs) csvsave_target, de00(right : Image) de00, de76(right : Image) de76, decmc(right : Image) decmc, deviate deviate, dilate(mask : Image) dilate, divide(right : Image) divide, dzsave(filename : String, **kwargs) dzsave, dzsave_buffer(**kwargs) dzsave_buffer, dzsave_stream(stream : IO, **kwargs) dzsave_stream, dzsave_target(target : Target, **kwargs) dzsave_target, embed(x : Int32, y : Int32, width : Int32, height : Int32, **kwargs) embed, erode(mask : Image) erode, exp : Image exp, exp10 : Image exp10, extract_area(left : Int32, top : Int32, width : Int32, height : Int32) extract_area, extract_band(band : Int32, **kwargs) extract_band, falsecolour falsecolour, fastcor(ref : Image) fastcor, filename : String filename, fill_nearest fill_nearest, find_trim(**kwargs) find_trim, fitssave(filename : String, **kwargs) fitssave, flatten(**kwargs) flatten, flip(direction : Enums::Direction) flip, fliphor fliphor, flipver flipver, float2rad float2rad, floor : Image floor, format : Enums::BandFormat format, freqmult(mask : Image) freqmult, fwfft fwfft, gamma(**kwargs) gamma, gaussblur(sigma : Float64, **kwargs) gaussblur, get(name : String) get, get_fields get_fields, get_typeof(nam : String) get_typeof, getpoint(x : Int32, y : Int32) getpoint, gifsave(filename : String, **kwargs) gifsave, gifsave_buffer(**kwargs) gifsave_buffer, gifsave_stream(stream : IO, **kwargs) gifsave_stream, gifsave_target(target : Target, **kwargs) gifsave_target, globalbalance(**kwargs) globalbalance, gravity(direction : Enums::CompassDirection, width : Int32, height : Int32, **kwargs) gravity, grid(tile_height : Int32, across : Int32, down : Int32) grid, has_alpha? : Bool has_alpha?, height : Int32 height, hist_cum hist_cum, hist_entropy hist_entropy, hist_equal(**kwargs) hist_equal, hist_find(**kwargs) hist_find, hist_find_indexed(index : Image, **kwargs) hist_find_indexed, hist_find_ndim(**kwargs) hist_find_ndim, hist_ismonotonic hist_ismonotonic, hist_local(width : Int32, height : Int32, **kwargs) hist_local, hist_match(ref : Image) hist_match, hist_norm hist_norm, hist_plot hist_plot, hough_circle(**kwargs) hough_circle, hough_line(**kwargs) hough_line, hsv2srgb hsv2srgb, icc_export(**kwargs) icc_export, icc_import(**kwargs) icc_import, icc_transform(output_profile : String, **kwargs) icc_transform, ifthenelse(in1, in2, blend = false) ifthenelse, imag : Image imag, insert(sub : Image, x : Int32, y : Int32, **kwargs) insert, interpretation : Enums::Interpretation interpretation, invert invert, invertlut(**kwargs) invertlut, invfft(**kwargs) invfft, join(in2 : Image, direction : Enums::Direction, **kwargs) join, jp2ksave(filename : String, **kwargs) jp2ksave, jp2ksave_buffer(**kwargs) jp2ksave_buffer, jp2ksave_stream(stream : IO, **kwargs) jp2ksave_stream, jp2ksave_target(target : Target, **kwargs) jp2ksave_target, jpegsave(filename : String, **kwargs) jpegsave, jpegsave_buffer(**kwargs) jpegsave_buffer, jpegsave_mime(**kwargs) jpegsave_mime, jpegsave_stream(stream : IO, **kwargs) jpegsave_stream, jpegsave_target(target : Target, **kwargs) jpegsave_target, jxlsave(filename : String, **kwargs) jxlsave, jxlsave_buffer(**kwargs) jxlsave_buffer, jxlsave_stream(stream : IO, **kwargs) jxlsave_stream, jxlsave_target(target : Target, **kwargs) jxlsave_target, killed? killed?, lab2labq lab2labq, lab2labs lab2labs, lab2lch lab2lch, lab2xyz(**kwargs) lab2xyz, labelregions labelregions, labq2lab labq2lab, labq2labs labq2labs, labq2srgb labq2srgb, labs2lab labs2lab, labs2labq labs2labq, lch2cmc lch2cmc, lch2lab lch2lab, linear(a : Array(Float64), b : Array(Float64), **kwargs) linear, linecache(**kwargs) linecache, log : Image log, log10 : Image log10, magicksave(filename : String, **kwargs) magicksave, magicksave_bmp(filename : String, **kwargs) magicksave_bmp, magicksave_bmp_buffer(**kwargs) magicksave_bmp_buffer, magicksave_buffer(**kwargs) magicksave_buffer, mapim(index : Image, **kwargs) mapim, maplut(lut : Image, **kwargs) maplut, match(sec : Image, xr1 : Int32, yr1 : Int32, xs1 : Int32, ys1 : Int32, xr2 : Int32, yr2 : Int32, xs2 : Int32, ys2 : Int32, **kwargs) match, math(math : Enums::OperationMath) math, math2(right : Image, math2 : Enums::OperationMath2) math2, math2_const(math2 : Enums::OperationMath2, c : Array(Float64)) math2_const, matrixinvert matrixinvert, matrixprint(**kwargs) matrixprint, matrixsave(filename : String, **kwargs) matrixsave, matrixsave_stream(stream : IO, **kwargs) matrixsave_stream, matrixsave_target(target : Target, **kwargs) matrixsave_target, max(**kwargs) max, maxpos maxpos, measure(h : Int32, v : Int32, **kwargs) measure, median(size = 3) median, merge(sec : Image, direction : Enums::Direction, dx : Int32, dy : Int32, **kwargs) merge, min(**kwargs) min, minpos minpos, morph(mask : Image, morph : Enums::OperationMorphology) morph, mosaic(sec : Image, direction : Enums::Direction, xref : Int32, yref : Int32, xsec : Int32, ysec : Int32, **kwargs) mosaic, mosaic1(sec : Image, direction : Enums::Direction, xr1 : Int32, yr1 : Int32, xs1 : Int32, ys1 : Int32, xr2 : Int32, yr2 : Int32, xs2 : Int32, ys2 : Int32, **kwargs) mosaic1, msb(**kwargs) msb, multiply(right : Image) multiply, mutate(&) mutate, new_from_image(value)
new_from_image(*value : Int32 | Float64)
new_from_image
, offset offset, page_height : Int32 page_height, pbmsave_stream(stream : IO, **kwargs) pbmsave_stream, pbmsave_target(target : Target, **kwargs) pbmsave_target, percent(percent : Float64) percent, pfmsave_stream(stream : IO, **kwargs) pfmsave_stream, pfmsave_target(target : Target, **kwargs) pfmsave_target, pgmsave_stream(stream : IO, **kwargs) pgmsave_stream, pgmsave_target(target : Target, **kwargs) pgmsave_target, phasecor(in2 : Image) phasecor, pngsave(filename : String, **kwargs) pngsave, pngsave_buffer(**kwargs) pngsave_buffer, pngsave_stream(stream : IO, **kwargs) pngsave_stream, pngsave_target(target : Target, **kwargs) pngsave_target, pnmsave_stream(stream : IO, **kwargs) pnmsave_stream, pnmsave_target(target : Target, **kwargs) pnmsave_target, polar : Image polar, ppmsave(filename : String, **kwargs) ppmsave, ppmsave_stream(stream : IO, **kwargs) ppmsave_stream, ppmsave_target(target : Target, **kwargs) ppmsave_target, premultiply(**kwargs) premultiply, profile profile, project project, quadratic(coeff : Image, **kwargs) quadratic, rad2float rad2float, radsave(filename : String, **kwargs) radsave, radsave_buffer(**kwargs) radsave_buffer, radsave_stream(stream : IO, **kwargs) radsave_stream, radsave_target(target : Target, **kwargs) radsave_target, rank(width : Int32, height : Int32, index : Int32) rank, rawsave(filename : String, **kwargs) rawsave, rawsave_fd(fd : Int32, **kwargs) rawsave_fd, real : Image real, recomb(m : Image) recomb, rect : Image rect, reduce(hshrink : Float64, vshrink : Float64, **kwargs) reduce, reduceh(hshrink : Float64, **kwargs) reduceh, reducev(vshrink : Float64, **kwargs) reducev, relational(right : Image, relational : Enums::OperationRelational) relational, relational_const(relational : Enums::OperationRelational, c : Array(Float64)) relational_const, remainder(right : Image) remainder, remainder_const(c : Array(Float64)) remainder_const, replicate(across : Int32, down : Int32) replicate, resize(scale : Float64, **kwargs) resize, rint : Image rint, rot(angle : Enums::Angle) rot, rot180 rot180, rot270 rot270, rot45(**kwargs) rot45, rot90 rot90, rotate(angle : Float64, **kwargs) rotate, round(round : Enums::OperationRound) round, scale scale, scaleimage(**opts) scaleimage, scrgb2bw(**kwargs) scrgb2bw, scrgb2srgb(**kwargs) scrgb2srgb, scrgb2xyz scrgb2xyz, sequential(**kwargs) sequential, set_kill(kill : Bool) set_kill, set_progress(enable : Bool)
set_progress(&block : Int32 -> Nil)
set_progress
, sharpen(**kwargs) sharpen, shrink(hshrink : Float64, vshrink : Float64, **kwargs) shrink, shrinkh(hshrink : Int32, **kwargs) shrinkh, shrinkv(vshrink : Int32, **kwargs) shrinkv, sign sign, signal_connect(signal : Enums::Signal, data : Pointer(Void) = Pointer(Void).null, &callback : EvalProc) signal_connect, similarity(**kwargs) similarity, sin : Image sin, sinh : Image sinh, size size, smartcrop(width : Int32, height : Int32, **kwargs) smartcrop, sobel sobel, spcor(ref : Image) spcor, spectrum spectrum, srgb2hsv srgb2hsv, srgb2scrgb srgb2scrgb, stats stats, stdif(width : Int32, height : Int32, **kwargs) stdif, subsample(xfac : Int32, yfac : Int32, **kwargs) subsample, subtract(right : Image) subtract, tan : Image tan, tanh : Image tanh, thumbnail_image(width : Int32, **kwargs) thumbnail_image, tiffsave(filename : String, **kwargs) tiffsave, tiffsave_buffer(**kwargs) tiffsave_buffer, tiffsave_stream(stream : IO, **kwargs) tiffsave_stream, tiffsave_target(target : Target, **kwargs) tiffsave_target, tilecache(**kwargs) tilecache, to_s(io : IO) to_s, transpose3d(**kwargs) transpose3d, unpremultiply(**kwargs) unpremultiply, vipssave(filename : String, **kwargs) vipssave, vipssave_stream(stream : IO, **kwargs) vipssave_stream, vipssave_target(target : Target, **kwargs) vipssave_target, webpsave(filename : String, **kwargs) webpsave, webpsave_buffer(**kwargs) webpsave_buffer, webpsave_mime(**kwargs) webpsave_mime, webpsave_stream(stream : IO, **kwargs) webpsave_stream, webpsave_target(target : Target, **kwargs) webpsave_target, width : Int32 width, wrap(**kwargs) wrap, write(other : Image) write, write_to_buffer(format : String, **kwargs) write_to_buffer, write_to_bytes : Bytes write_to_bytes, write_to_file(name : String, **kwargs) write_to_file, write_to_memory : Tuple(Pointer(Void), LibC::SizeT) write_to_memory, write_to_target(stream : IO, format : String, **kwargs)
write_to_target(target : Target, format : String, **kwargs)
write_to_target
, xoffset : Int32 xoffset, xres : Float64 xres, xyz2cmyk xyz2cmyk, xyz2lab(**kwargs) xyz2lab, xyz2scrgb xyz2scrgb, xyz2yxy xyz2yxy, yoffset : Int32 yoffset, yres : Float64 yres, yxy2xyz yxy2xyz, zoom(xfac : Int32, yfac : Int32) zoom

Constructor methods inherited from class Vips::Image

imageize(match_image : Image, value) : Image imageize, new_from_array(array : Array, scale = 1.0, offset = 0.0) : Image new_from_array, new_from_buffer(data : String | Bytes | IO, option_string : String = "", access : Enums::Access | Nil = nil, failon : Enums::FailOn | Nil = nil, **opts) : Image new_from_buffer, new_from_file(name : String, memory : Bool | Nil = nil, access : Enums::Access | Nil = nil, failon : Enums::FailOn | Nil = nil, **opts) : Image new_from_file, new_from_memory(data : Bytes, width : Int32, height : Int32, bands : Int32, format : Enums::BandFormat) : Image new_from_memory, new_from_memory_copy(data : Pointer(Void), size : UInt64, width : Int32, height : Int32, bands : Int32, format : Enums::BandFormat) : Image new_from_memory_copy, new_from_source(source : Source, option_string : String = "", access : Enums::Access | Nil = nil, failon : Enums::FailOn | Nil = nil, **opts) : Image new_from_source, new_from_stream(stream : IO, option_string : String = "", access : Enums::Access | Nil = nil, failon : Enums::FailOn | Nil = nil, **opts) : Image new_from_stream, new_temp_file(format : String) : Image new_temp_file

Class methods inherited from class Vips::Image

analyzeload(filename : String, **kwargs) analyzeload, arrayjoin(in_ : Array(Image), **kwargs) arrayjoin, black(width : Int32, height : Int32, **kwargs) black, csvload(filename : String, **kwargs) csvload, csvload_source(source : Source, **kwargs) csvload_source, csvload_stream(stream : IO, **kwargs) csvload_stream, eye(width : Int32, height : Int32, **kwargs) eye, find_load(filename : String) find_load, find_load_buffer(data : Bytes)
find_load_buffer(data : String)
find_load_buffer
, find_load_source(source : Source) find_load_source, find_load_stream(stream : Stream) find_load_stream, fitsload(filename : String, **kwargs) fitsload, fitsload_source(source : Source, **kwargs) fitsload_source, fitsload_stream(stream : IO, **kwargs) fitsload_stream, fractsurf(width : Int32, height : Int32, fractal_dimension : Float64) fractsurf, gaussmat(sigma : Float64, min_ampl : Float64, **kwargs) gaussmat, gaussnoise(width : Int32, height : Int32, **kwargs) gaussnoise, gifload(filename : String, **kwargs) gifload, gifload_buffer(buffer : Bytes, **kwargs) gifload_buffer, gifload_source(source : Source, **kwargs) gifload_source, gifload_stream(stream : IO, **kwargs) gifload_stream, grey(width : Int32, height : Int32, **kwargs) grey, heifload(filename : String, **kwargs) heifload, heifload_buffer(buffer : Bytes, **kwargs) heifload_buffer, heifload_source(source : Source, **kwargs) heifload_source, heifload_stream(stream : IO, **kwargs) heifload_stream, identity(**kwargs) identity, jp2kload(filename : String, **kwargs) jp2kload, jp2kload_buffer(buffer : Bytes, **kwargs) jp2kload_buffer, jp2kload_source(source : Source, **kwargs) jp2kload_source, jp2kload_stream(stream : IO, **kwargs) jp2kload_stream, jpegload(filename : String, **kwargs) jpegload, jpegload_buffer(buffer : Bytes, **kwargs) jpegload_buffer, jpegload_source(source : Source, **kwargs) jpegload_source, jpegload_stream(stream : IO, **kwargs) jpegload_stream, jxlload(filename : String, **kwargs) jxlload, jxlload_buffer(buffer : Bytes, **kwargs) jxlload_buffer, jxlload_source(source : Source, **kwargs) jxlload_source, jxlload_stream(stream : IO, **kwargs) jxlload_stream, logmat(sigma : Float64, min_ampl : Float64, **kwargs) logmat, magickload(filename : String, **kwargs) magickload, magickload_buffer(buffer : Bytes, **kwargs) magickload_buffer, mask_butterworth(width : Int32, height : Int32, order : Float64, frequency_cutoff : Float64, amplitude_cutoff : Float64, **kwargs) mask_butterworth, mask_butterworth_band(width : Int32, height : Int32, order : Float64, frequency_cutoff_x : Float64, frequency_cutoff_y : Float64, radius : Float64, amplitude_cutoff : Float64, **kwargs) mask_butterworth_band, mask_butterworth_ring(width : Int32, height : Int32, order : Float64, frequency_cutoff : Float64, amplitude_cutoff : Float64, ringwidth : Float64, **kwargs) mask_butterworth_ring, mask_fractal(width : Int32, height : Int32, fractal_dimension : Float64, **kwargs) mask_fractal, mask_gaussian(width : Int32, height : Int32, frequency_cutoff : Float64, amplitude_cutoff : Float64, **kwargs) mask_gaussian, mask_gaussian_band(width : Int32, height : Int32, frequency_cutoff_x : Float64, frequency_cutoff_y : Float64, radius : Float64, amplitude_cutoff : Float64, **kwargs) mask_gaussian_band, mask_gaussian_ring(width : Int32, height : Int32, frequency_cutoff : Float64, amplitude_cutoff : Float64, ringwidth : Float64, **kwargs) mask_gaussian_ring, mask_ideal(width : Int32, height : Int32, frequency_cutoff : Float64, **kwargs) mask_ideal, mask_ideal_band(width : Int32, height : Int32, frequency_cutoff_x : Float64, frequency_cutoff_y : Float64, radius : Float64, **kwargs) mask_ideal_band, mask_ideal_ring(width : Int32, height : Int32, frequency_cutoff : Float64, ringwidth : Float64, **kwargs) mask_ideal_ring, matload(filename : String, **kwargs) matload, matrixload(filename : String, **kwargs) matrixload, matrixload_source(source : Source, **kwargs) matrixload_source, matrixload_stream(stream : IO, **kwargs) matrixload_stream, openexrload(filename : String, **kwargs) openexrload, openslideload(filename : String, **kwargs) openslideload, openslideload_source(source : Source, **kwargs) openslideload_source, openslideload_stream(stream : IO, **kwargs) openslideload_stream, pdfload(filename : String, **kwargs) pdfload, pdfload_buffer(buffer : Bytes, **kwargs) pdfload_buffer, pdfload_source(source : Source, **kwargs) pdfload_source, pdfload_stream(stream : IO, **kwargs) pdfload_stream, perlin(width : Int32, height : Int32, **kwargs) perlin, pngload(filename : String, **kwargs) pngload, pngload_buffer(buffer : Bytes, **kwargs) pngload_buffer, pngload_source(source : Source, **kwargs) pngload_source, pngload_stream(stream : IO, **kwargs) pngload_stream, ppmload(filename : String, **kwargs) ppmload, ppmload_source(source : Source, **kwargs) ppmload_source, ppmload_stream(stream : IO, **kwargs) ppmload_stream, profile_load(name : String) profile_load, radload(filename : String, **kwargs) radload, radload_buffer(buffer : Bytes, **kwargs) radload_buffer, radload_source(source : Source, **kwargs) radload_source, radload_stream(stream : IO, **kwargs) radload_stream, rawload(filename : String, width : Int32, height : Int32, bands : Int32, **kwargs) rawload, run_cmplx(image : Image, &block : Image -> Image) run_cmplx, sines(width : Int32, height : Int32, **kwargs) sines, sum(*in_ : Image) sum, svgload(filename : String, **kwargs) svgload, svgload_buffer(buffer : Bytes, **kwargs) svgload_buffer, svgload_source(source : Source, **kwargs) svgload_source, svgload_stream(stream : IO, **kwargs) svgload_stream, switch(*tests : Image) switch, system(cmd_format : String, **kwargs) system, thumbnail(filename : String, width : Int32, **kwargs) thumbnail, thumbnail_buffer(buffer : Bytes, width : Int32, **kwargs) thumbnail_buffer, thumbnail_source(source : Source, width : Int32, **kwargs) thumbnail_source, thumbnail_stream(stream : IO, width : Int32, **kwargs) thumbnail_stream, tiffload(filename : String, **kwargs) tiffload, tiffload_buffer(buffer : Bytes, **kwargs) tiffload_buffer, tiffload_source(source : Source, **kwargs) tiffload_source, tiffload_stream(stream : IO, **kwargs) tiffload_stream, tonelut(**kwargs) tonelut, vipsload(filename : String, **kwargs) vipsload, vipsload_source(source : Source, **kwargs) vipsload_source, vipsload_stream(stream : IO, **kwargs) vipsload_stream, webpload(filename : String, **kwargs) webpload, webpload_buffer(buffer : Bytes, **kwargs) webpload_buffer, webpload_source(source : Source, **kwargs) webpload_source, webpload_stream(stream : IO, **kwargs) webpload_stream, worley(width : Int32, height : Int32, **kwargs) worley, xyz(width : Int32, height : Int32, **kwargs) xyz, zone(width : Int32, height : Int32, **kwargs) zone

Instance methods inherited from class Vips::VipsObject

get(name : String) get, get_blurb(name : String) get_blurb, get_description get_description, get_pspec(name : String) : LibVips::GParamSpec | Nil get_pspec, get_typeof(name : String) get_typeof, post_close(&block : -> ) post_close, print_all print_all, set(gtype, name, value)
set(options : String)
set

Instance methods inherited from class Vips::GObject

finalize finalize, get(name : String, gval : GValue) get, object_ref object_ref, ref_count ref_count, release_handle release_handle, set(name : String, gval : GValue) set, signal_connect(signal : String, callback : Proc, data : Pointer(Void) = Pointer(Void).null) : LibVips::Gulong signal_connect, signal_disconnect(handler_id : LibVips::Gulong)
signal_disconnect(func : Proc, data : Pointer(Void) = Pointer(Void).null)
signal_disconnect(data : LibVips::Gpointer)
signal_disconnect

Instance Method Detail

def []=(index, value) #

Use [] to set band elements on an image. For example

img = image.mutate { |x| x[1] = green }

will change band 1 ( the middle band)


[View source]
def draw_circle(ink : Array(Float64), cx : Int32, cy : Int32, radius : Int32, **kwargs) : Nil #

Draw a circle on an image

# image.mutate { |x| x.draw_circle(ink, cx, cy, radius, {fill: Bool} }

Input Parameters

Required

ink : Array(Float64) - Color for pixels

cx : Int32 - Centre of draw_circle

cy : Int32 - Centre of draw_circle

radius : Int32 - Radius in pixels

Optionals

fill : Bool - Draw a solid object


[View source]
def draw_flood(ink : Array(Float64), x : Int32, y : Int32, **kwargs) : Nil #

Flood-fill an area

# image.mutate { |x| x.draw_flood(ink, x, y, {test: Image, equal: Bool} }

Input Parameters

Required

ink : Array(Float64) - Color for pixels

x : Int32 - DrawFlood start point

y : Int32 - DrawFlood start point

Optionals

test : Image - Test pixels in this image

equal : Bool - DrawFlood while equal to edge


[View source]
def draw_image(sub : Image, x : Int32, y : Int32, **kwargs) : Nil #

Paint an image into another image

# image.mutate { |x| x.draw_image(sub, x, y, {mode: Enums::CombineMode} }

Input Parameters

Required

sub : Image - Sub-image to insert into main image

x : Int32 - Draw image here

y : Int32 - Draw image here

Optionals

mode : Enums::CombineMode - Combining mode


[View source]
def draw_line(ink : Array(Float64), x1 : Int32, y1 : Int32, x2 : Int32, y2 : Int32) : Nil #

Draw a line on an image

# image.mutate { |x| x.draw_line(ink, x1, y1, x2, y2 }

Input Parameters

Required

ink : Array(Float64) - Color for pixels

x1 : Int32 - Start of draw_line

y1 : Int32 - Start of draw_line

x2 : Int32 - End of draw_line

y2 : Int32 - End of draw_line


[View source]
def draw_mask(ink : Array(Float64), mask : Image, x : Int32, y : Int32) : Nil #

Draw a mask on an image

# image.mutate { |x| x.draw_mask(ink, mask, x, y }

Input Parameters

Required

ink : Array(Float64) - Color for pixels

mask : Image - Mask of pixels to draw

x : Int32 - Draw mask here

y : Int32 - Draw mask here


[View source]
def draw_rect(ink : Array(Float64), left : Int32, top : Int32, width : Int32, height : Int32, **kwargs) : Nil #

Paint a rectangle on an image

# image.mutate { |x| x.draw_rect(ink, left, top, width, height, {fill: Bool} }

Input Parameters

Required

ink : Array(Float64) - Color for pixels

left : Int32 - Rect to fill

top : Int32 - Rect to fill

width : Int32 - Rect to fill

height : Int32 - Rect to fill

Optionals

fill : Bool - Draw a solid object


[View source]
def draw_smudge(left : Int32, top : Int32, width : Int32, height : Int32) : Nil #

Blur a rectangle on an image

# image.mutate { |x| x.draw_smudge(left, top, width, height }

Input Parameters

Required

left : Int32 - Rect to fill

top : Int32 - Rect to fill

width : Int32 - Rect to fill

height : Int32 - Rect to fill


[View source]
def mutate(&) #
Description copied from class Vips::Image

Mutate an image with a block. Inside the block, you can call methods which modify the image, such as setting or removing metadata, or modifying pixels.

For example:

image = image.mutate do |x|
  (0..1).step 0.01 do |i|
    x.draw_line([255.0], (x.width * i).to_i, 0, 0, (x.height * (1 - i)).to_i)
  end
end

See MutableImage.


[View source]
def remove(name : String) #

Remove a metadata item from an image. named metadata item is removed


[View source]
def set(gtype : LibVips::GType, name : String, value) #

Sets the type and value of an item of metadata. Any old item of the same name is removed. See GValue for types


[View source]
def set(name : String, value) #

Sets the value of an item of metadata. The metadata item must already exists


[View source]
def to_s(io : IO) #
Description copied from class Reference

Appends a short String representation of this object which includes its class name and its object address.

class Person
  def initialize(@name : String, @age : Int32)
  end
end

Person.new("John", 32).to_s # => #<Person:0x10a199f20>

[View source]