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:
7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'ext/writer.c', line 7 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.
79 80 81 82 83 |
# File 'ext/writer.c', line 79 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.
107 108 109 110 111 |
# File 'ext/writer.c', line 107 static VALUE writer_icc_set(VALUE obj, VALUE str) { return (obj, IM_META_ICC_NAME, str); } |
#image ⇒ Object
Returns the image associated with self.
29 30 31 32 33 34 35 36 37 38 |
# File 'ext/writer.c', line 29 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.
92 93 94 95 96 |
# File 'ext/writer.c', line 92 static VALUE writer_remove_exif(VALUE obj) { return (obj, IM_META_EXIF_NAME); } |
#remove_icc ⇒ Boolean
Removes icc data associated with self.
120 121 122 123 124 |
# File 'ext/writer.c', line 120 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_internal path end |