Class | Magick::Image
In: | lib/RMagick.rb ext/RMagick/rmmain.c
Parent: | Object

### Methods

annotate color_fill_to_border color_floodfill color_point color_reset! crop_resized crop_resized! cur_image each_iptc_dataset each_pixel get_exif_by_entry get_exif_by_number get_iptc_dataset level matte_fill_to_border matte_floodfill matte_point matte_replace matte_reset! resample resize_to_fill resize_to_fill! resize_to_fit resize_to_fit! texture_fill_to_border texture_floodfill view

### Included Modules

Comparable

### Classes and Modules

Class Magick::Image::DrawOptions
Class Magick::Image::Info
Class Magick::Image::PolaroidOptions
Class Magick::Image::View

### External Aliases

remap | -> | affinity
display | -> | __display__

### Public Instance methods

annotate(draw, width, height, x, y, text, &block)

Provide an alternate version of Draw#annotate, for folks who want to find it in this class.

color_fill_to_border(x, y, fill)

Set all pixels that are neighbors of x,y and are not the border color to the fill color

color_floodfill(x, y, fill)

Set all pixels that have the same color as the pixel at x,y and are neighbors to the fill color

color_point(x, y, fill)

Set the color at x,y

color_reset!(fill)

Set all pixels to the fill color. Very similar to Image#erase! Accepts either String or Pixel arguments

crop_resized(ncols, nrows=nil, gravity=CenterGravity)

Alias for resize_to_fill

crop_resized!(ncols, nrows=nil, gravity=CenterGravity)

Alias for resize_to_fill!

cur_image()

Used by ImageList methods - see ImageList#cur_image

each_iptc_dataset() {|dataset, data_field| ...}

Iterate over IPTC record number:dataset tags, yield for each non-nil dataset

each_pixel() {|p, n%columns, n/columns| ...}

Thanks to Russell Norris!

get_exif_by_entry(*entry)

Retrieve EXIF data by entry or all. If one or more entry names specified, return the values associated with the entries. If no entries specified, return all entries and values. The return value is an array of [name,value] arrays.

get_exif_by_number(*tag)

Retrieve EXIF data by tag number or all tag/value pairs. The return value is a hash.

get_iptc_dataset(ds)

Retrieve IPTC information by record number:dataset tag constant defined in Magick::IPTC, above.

level(black_point=0.0, white_point=nil, gamma=nil)

(Thanks to Al Evans for the suggestion.)

matte_fill_to_border(x, y)

Make transparent any neighbor pixel that is not the border color.

matte_floodfill(x, y)

Make transparent any pixel that matches the color of the pixel at (x,y) and is a neighbor.

matte_point(x, y)

Make the pixel at (x,y) transparent.

matte_replace(x, y)

Make transparent all pixels that are the same color as the pixel at (x, y).

matte_reset!()

Make all pixels transparent.

resample(x_res=72.0, y_res=nil)

Corresponds to ImageMagick‘s -resample option

resize_to_fill(ncols, nrows=nil, gravity=CenterGravity)

Force an image to exact dimensions without changing the aspect ratio. Resize and crop if necessary. (Thanks to Jerett Taylor!)

resize_to_fill!(ncols, nrows=nil, gravity=CenterGravity)
resize_to_fit(cols, rows=nil)

Convenience method to resize retaining the aspect ratio. (Thanks to Robert Manni!)

resize_to_fit!(cols, rows=nil)
texture_fill_to_border(x, y, texture)

Replace neighboring pixels to border color with texture pixels

texture_floodfill(x, y, texture)

Replace matching neighboring pixels with texture pixels

view(x, y, width, height) {|view| ...}

Construct a view. If a block is present, yield and pass the view object, otherwise return the view object.

[Validate]