Class: VIPS::Reader
- Inherits:
-
Object
- Object
- VIPS::Reader
- Includes:
- Header
- Defined in:
- lib/vips/reader.rb,
ext/reader.c
Direct Known Subclasses
AnalyzeReader, CSVReader, EXRReader, JPEGReader, MagickReader, PNGReader, PPMReader, RAWReader, TIFFReader, VIPSReader
Instance Attribute Summary collapse
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(path, options = {}) ⇒ Reader
constructor
A new instance of Reader.
- #read ⇒ Object
Methods included from Header
#band_fmt, #bands, #exif, #exif?, #get, #icc, #icc?, #n_elements, #set, #sizeof_element, #sizeof_line, #sizeof_pel, #x_offset, #x_res, #x_size, #y_offset, #y_res, #y_size
Constructor Details
#initialize(path, options = {}) ⇒ Reader
Returns a new instance of Reader.
5 6 7 8 |
# File 'lib/vips/reader.rb', line 5 def initialize(path, ={}) @path = path read_header path unless [:skip_header] end |
Instance Attribute Details
#path ⇒ Object (readonly)
Returns the value of attribute path.
3 4 5 |
# File 'lib/vips/reader.rb', line 3 def path @path end |
Class Method Details
.read(path, options = {}) ⇒ Object
10 11 12 13 14 |
# File 'lib/vips/reader.rb', line 10 def self.read(path, ={}) [:skip_header] = true reader = new path, reader.read end |
.recognized?(path) ⇒ Boolean
:nodoc:
53 54 55 56 57 58 59 60 61 62 |
# File 'ext/reader.c', line 53
static VALUE
reader_s_recognized_p(VALUE klass, VALUE path)
{
VipsFormatClass *fmt_class = reader_get_fmt_class(klass);
if (fmt_class && fmt_class->is_a && fmt_class->is_a(StringValuePtr(path)))
return Qtrue;
return Qfalse;
}
|
Instance Method Details
#read ⇒ Object
16 17 18 |
# File 'lib/vips/reader.rb', line 16 def read read_internal @path end |