MagickInput

Input object reading image files using RMagick.  It is recommended to use the load_* methods of MultiArray instead.

RMagick is an interface to ImageMagick/Magick++.  A full-featured installation of ImageMagick supports reading from a large set of file formats (8BIM, 8BIMTEXT, 8BIMWTEXT, APP1, APP1JPEG, ART, AVI, AVS, BIE, BMP, CAPTION, CMYK, CMYKA, CUR, CUT, DCM, DCX, DPS, DPX, EPDF, EPI, EPS, EPSF, EPSI, EPT, EXIF, FAX, FITS, FPX, FRACTAL, G3, GIF, GIF87, GRADIENT, GRANITE, GRAY, ICB, ICC, ICM, ICO, ICON, IPTC, IPTCTEXT, IPTCWTEXT, JBG, JBIG, JNG, JPEG, JPG, LABEL, LOGO, M2V, MAGICK, MAP, MAT, MIFF, MNG, MONO, MPC, MPEG, MPG, MSL, MTV, MVG, NETSCAPE, NULL, OTB, P7, PAL, PALM, PATTERN, PBM, PCD, PCDS, PCT, PCX, PDB, PDF, PFA, FB, PGM, PICON, PICT, PIX, PLASMA, PM, PNG, PNG24, PNG32, PNG8, PNM, PPM, PS, PSD, PTIF, PWP, RAS, RGB, RGBA, RLA, RLE, SCT, SFW, SGI, STEGANO, SUN, SVG, TEXT, TGA, TIF, TIFF, TILE, TIM, TTF, TXT, UYVY, VDA, VICAR, VID, VIFF, VST, WBMP, WMF, WPG, X, XBM, XC, XCF, XMP, XPM, XV, XWD, YUV).

Note that there are still countries with laws restricting the distribution of free image decompression software for some file formats.

This class does not allow reading of the raw image data formats.

Inherits

See also

Summary
MagickInputInput object reading image files using RMagick.
Functions
MagickInput.newConstructor.
inspectReturn string with information about this object.
readRead an image and return it.
status?Indicates whether more images are available.

Functions

MagickInput.new

def MagickInput.new(file)

Constructor.

Parameters

fileA filename or an open file.

inspect

def inspect

Return string with information about this object.

Returns

Returns a string which will look like this: “MagickInput-object(1 image(s) left)”.

read

def read

Read an image and return it.

Returns

An object of type <Image>.

See also

status?

def status?

Indicates whether more images are available.

def MagickInput.new(file)
Constructor.
def inspect
Return string with information about this object.
def read
Read an image and return it.
def status?
Indicates whether more images are available.
def MultiArray(element_type,
*shape)
Create a multi-dimensional array class.
Base class for different types of input sources for images.
This example shows how to load a colour image.
Close