diff scripts/image/imwrite.m @ 17853:aacb9da13df6

imwrite: implement LoopCount option. * __magick_read__.cc (F__magick_write__): set animationIterations() when writing an image to implement the LoopCount option. * private/__imwrite__.m: input check for the new option LoopCount and set its default. Also fix bug that was using varargin rather than the param/key cell to print error message on unknown option. * imwrite.m: document new option and its problems.
author Carnë Draug <carandraug@octave.org>
date Tue, 05 Nov 2013 05:05:11 +0000
parents d63878346099
children adb0ba0d0c13
line wrap: on
line diff
--- a/scripts/image/imwrite.m	Mon Jun 24 16:02:54 2013 -0500
+++ b/scripts/image/imwrite.m	Tue Nov 05 05:05:11 2013 +0000
@@ -47,6 +47,14 @@
 ## dimension must be a singleton.  By default, image will be completely
 ## opaque.
 ##
+## @item LoopCount
+## For formats that accept animations (such as GIF), controls how many times
+## the sequence is repeated.  A value of Inf means an infinite loop (default),
+## a value of 0 or 1 that the sequence is played only once (loops zero times),
+## while a value of 2 or above loops that number of times (looping twice means
+## it plays the complete sequence 3 times).  This option is ignored when there
+## is only a single image at the end of writing the file.
+##
 ## @item Quality
 ## Set the quality of the compression.  The value should be an
 ## integer between 0 and 100, with larger values indicating higher visual