Class: VIPS::Reader
- Inherits:
-
Object
- Object
- VIPS::Reader
- 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
-
.recognized?(path) ⇒ Boolean
:nodoc:.
Instance Method Summary collapse
- #exif ⇒ Object
- #exif? ⇒ Boolean
-
#initialize(path, options = {}) ⇒ Reader
constructor
A new instance of Reader.
- #read ⇒ Object
-
#x_size ⇒ Object
support these two for compat with older ruby-vips.
- #y_size ⇒ Object
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 @_im = nil 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
.recognized?(path) ⇒ Boolean
:nodoc:
26 27 28 29 30 31 32 33 34 35 |
# File 'ext/reader.c', line 26
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
#exif ⇒ Object
27 28 29 |
# File 'lib/vips/reader.rb', line 27 def exif read.exif end |
#exif? ⇒ Boolean
31 32 33 |
# File 'lib/vips/reader.rb', line 31 def exif? read.exif? end |
#read ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/vips/reader.rb', line 10 def read # in case the sub-class has not read it if not @_im @_im = read_retry @path, 0 end @_im end |
#x_size ⇒ Object
support these two for compat with older ruby-vips
19 20 21 |
# File 'lib/vips/reader.rb', line 19 def x_size read.x_size end |
#y_size ⇒ Object
23 24 25 |
# File 'lib/vips/reader.rb', line 23 def y_size read.y_size end |