Mercurial > hg > octave-nkf
diff libinterp/dldfcn/__magick_read__.cc @ 17854:adb0ba0d0c13
imwrite: implement DelayTime option.
* __magick_read__.cc (F__magick_write__): set animationDelay() when
writing an image to implement the DelayTime option.
* private/__imwrite__.m: input check for the new option DelayTime and
set its default. Organize options in alphabetic order.
* imwrite.m: document new option.
author | Carnë Draug <carandraug@octave.org> |
---|---|
date | Tue, 05 Nov 2013 05:48:56 +0000 |
parents | aacb9da13df6 |
children | bfbe5dcc9943 |
line wrap: on
line diff
--- a/libinterp/dldfcn/__magick_read__.cc +++ b/libinterp/dldfcn/__magick_read__.cc @@ -1387,11 +1387,14 @@ const octave_idx_type nFrames = imvec.size (); - // FIXME What happens when we try to set with formats that do not support it? const octave_idx_type quality = options.getfield ("quality").int_value (); for (octave_idx_type i = 0; i < nFrames; i++) imvec[i].quality (quality); + const ColumnVector delaytime = options.getfield ("delaytime").column_vector_value (); + for (octave_idx_type i = 0; i < nFrames; i++) + imvec[i].animationDelay (delaytime(i)); + // If writemode is set to append, read the image and append to it. Even // if set to append, make sure that something was read at all. const std::string writemode = options.getfield ("writemode").string_value ();