class CryMagick::Image
- CryMagick::Image
- Reference
- Object
Defined in:
crymagick/image.crcrymagick/image/info.cr
Constructors
Class Method Summary
-
.create(ext : String = "", validate : Bool = Configuration.validate_on_create, &)
Creates tempfile and yields it for writing.
- .import_pixels(blob : Array(Int), columns : Int, rows : Int, depth : Int, map : String | Symbol, format : String = "png")
- .import_pixels(blob : Slice(Int), columns : Int, rows : Int, depth : Int, map : String | Symbol, format : String = "png")
-
.open(path : String, ext : String | Nil = nil)
Creates new Image from given path
-
.read(file : String, ext : String = "")
Reads given string-based file with optional extension.
- .read(file : IO, ext : String = "")
Instance Method Summary
- #==(other : Image)
- #[](value)
- #collapse!(frame : Int32 = 0)
- #colorspace
- #combine_options(&)
- #composite(other_image, output_ext = type.downcase, mask : String | Nil = nil, &)
- #composite(other_image, output_ext = type.downcase, mask : String | Nil = nil)
- #data
- #destroy!
- #details
- #dimensions
- #exif
-
#format(_format, page : String = "0", read_options : Hash(String, String) = {} of String => String, &)
page = -1 for all frames
- #format(_format, page : String = "0", read_options : Hash(String, String) = {} of String => String)
- #frames
- #get_pixels
-
#hash
Generates an
UInt64hash value for this object. - #height
- #human_size
- #identify
- #identify(&)
- #layer?
- #layers
- #mime_type
- #mogrify(page : Int32 | Nil = nil)
- #mogrify(page : Int32 | Nil = nil, &)
- #pages
- #path : String
- #resolution(unit : String = "")
- #run_command(tool_name : String, *args)
- #signature
- #size
- #tempfile : File | Nil
- #tempfile!
- #type
- #valid?
- #validate!
- #width
- #write(output_to : String)
- #write(output : IO)
Macro Summary
Constructor Detail
Class Method Detail
Creates tempfile and yields it for writing.
Creates new Image from given path
TODO allow to pass url
Reads given string-based file with optional extension.
Instance Method Detail
page = -1 for all frames
TODO fix converting several frames - point current image to first one (now it points to empty img)
Generates an UInt64 hash value for this object.
This method must have the property that a == b implies a.hash == b.hash.
The hash value is used along with #== by the Hash class to determine if two objects
reference the same hash key.
Subclasses must not override this method. Instead, they must define hash(hasher),
though usually the macro def_hash can be used to generate this method.