diff scripts/image/private/__imwrite__.m @ 19899:e9f89866074c

maint: Cleanup some .m files to follow Octave coding conventions. * accumarray.m, validateattributes.m, iscolormap.m, __imread__.m, __imwrite__.m, imwrite_filename.m, strread.m, getappdata.m, appearance/annotation.m, shrinkfaces.m, rundemos.m, runtests.m, datenum.m, datestr.m: Break long lines before && and ||.
author John W. Eaton <jwe@octave.org>
date Thu, 26 Feb 2015 13:13:40 -0500
parents 9fc020886ae9
children 5b8e4f668c53
line wrap: on
line diff
--- a/scripts/image/private/__imwrite__.m	Thu Feb 26 13:07:04 2015 -0500
+++ b/scripts/image/private/__imwrite__.m	Thu Feb 26 13:13:40 2015 -0500
@@ -60,9 +60,9 @@
         elseif (size (options.alpha, 3) != 1)
           error ("imwrite: 3rd dimension of matrix for %s must be singleton",
                  param_list{idx});
-        elseif (ndims (options.alpha) > 4 ||
-                any (size (options.alpha)([1 2]) != size (img)([1 2])) ||
-                size (options.alpha, 4) != size (img, 4))
+        elseif (ndims (options.alpha) > 4
+                || any (size (options.alpha)([1 2]) != size (img)([1 2]))
+                || size (options.alpha, 4) != size (img, 4))
           error ("imwrite: matrix for %s must have same dimension as image",
                  param_list{idx});
         endif
@@ -88,8 +88,8 @@
 
       case "disposalmethod"
         options.disposalmethod = param_list{idx+1};
-        if (! ischar (options.disposalmethod) &&
-            ! iscellstr (options.disposalmethod))
+        if (! ischar (options.disposalmethod)
+            && ! iscellstr (options.disposalmethod))
           error ("imwrite: value for %s must be a string or cell array of strings",
                  param_list{idx});
         elseif (! iscell (options.disposalmethod))
@@ -115,8 +115,8 @@
       case "loopcount"
         options.loopcount = param_list{idx+1};
         if (! isscalar (options.loopcount) || ! isnumeric (options.loopcount)
-            || (! isinf (options.loopcount) && (options.loopcount < 0 ||
-                                                options.loopcount > 65535)))
+            || (! isinf (options.loopcount)
+                && (options.loopcount < 0 || options.loopcount > 65535)))
           error ("imwrite: value for %s must be Inf or between 0 and 65535",
                  param_list{idx});
         endif