Class: VIPS::Writer
- Inherits:
-
Object
- Object
- VIPS::Writer
- Includes:
- Header
- Defined in:
- lib/vips/writer.rb,
ext/writer.c
Direct Known Subclasses
CSVWriter, JPEGWriter, PNGWriter, PPMWriter, TIFFWriter, VIPSWriter
Instance Method Summary collapse
-
#exif=(exif_data) ⇒ Object
Sets the exif header of the writer to exif_data.
-
#icc=(icc_data) ⇒ Object
Sets the icc header of the writer to icc_data.
-
#image ⇒ Object
Returns the image associated with self.
-
#initialize(*args) ⇒ Object
constructor
:nodoc:.
-
#remove_exif ⇒ Boolean
Removes exif data associated with self.
-
#remove_icc ⇒ Boolean
Removes icc data associated with self.
- #write(path) ⇒ 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(*args) ⇒ Object
:nodoc:
5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'ext/writer.c', line 5 static VALUE writer_initialize(int argc, VALUE *argv, VALUE obj) { VALUE image, opts; rb_scan_args(argc, argv, "11", &image, &opts); GetImg(image, data, im); GetImg(obj, data_new, im_new); img_add_dep(data_new, image); if (im_copy(im, im_new)) vips_lib_error(); return obj; } |
Instance Method Details
#exif=(exif_data) ⇒ Object
Sets the exif header of the writer to exif_data. This will be written only if the file format supports embedded exif data.
77 78 79 80 81 |
# File 'ext/writer.c', line 77 static VALUE writer_exif_set(VALUE obj, VALUE str) { return (obj, IM_META_EXIF_NAME, str); } |
#icc=(icc_data) ⇒ Object
Sets the icc header of the writer to icc_data. This will be written only if the file format supports embedded icc data.
105 106 107 108 109 |
# File 'ext/writer.c', line 105 static VALUE writer_icc_set(VALUE obj, VALUE str) { return (obj, IM_META_ICC_NAME, str); } |
#image ⇒ Object
Returns the image associated with self.
27 28 29 30 31 32 33 34 35 36 |
# File 'ext/writer.c', line 27 static VALUE writer_image(VALUE obj) { GetImg(obj, data, im); if(data->deps) return data->deps[0]; return Qnil; } |
#remove_exif ⇒ Boolean
Removes exif data associated with self.
90 91 92 93 94 |
# File 'ext/writer.c', line 90 static VALUE writer_remove_exif(VALUE obj) { return (obj, IM_META_EXIF_NAME); } |
#remove_icc ⇒ Boolean
Removes icc data associated with self.
118 119 120 121 122 |
# File 'ext/writer.c', line 118 static VALUE writer_remove_icc(VALUE obj) { return (obj, IM_META_ICC_NAME); } |
#write(path) ⇒ Object
3 4 5 |
# File 'lib/vips/writer.rb', line 3 def write(path) write_gc path end |