comparison scripts/image/imread.m @ 21580:ecce63c99c3f

maint: Add semicolons to terminate code in %! blocks. * splineimages.m, Cell.cc, bsxfun.cc, cellfun.cc, conv2.cc, data.cc, debug.cc, file-io.cc, gcd.cc, getrusage.cc, graphics.cc, kron.cc, mappers.cc, oct-map.cc, ordschur.cc, psi.cc, rand.cc, variables.cc, __osmesa_print__.cc, amd.cc, audiodevinfo.cc, dmperm.cc, qr.cc, ov-bool-mat.cc, ov-class.cc, ov-fcn-handle.cc, ov-java.cc, oct-parse.in.yy, bicubic.m, delaunay3.m, accumarray.m, flip.m, fliplr.m, flipud.m, gradient.m, inputParser.m, interp1.m, narginchk.m, rot90.m, validateattributes.m, delaunay.m, delaunayn.m, griddata3.m, inpolygon.m, waitbar.m, gray2ind.m, hsv2rgb.m, im2double.m, image.m, imformats.m, imread.m, imshow.m, imwrite.m, ntsc2rgb.m, rgb2hsv.m, rgb2ntsc.m, isbanded.m, onenormest.m, edit.m, fullfile.m, license.m, ode23.m, ode45.m, glpk.m, annotation.m, legend.m, orient.m, text.m, area.m, barh.m, contour.m, line.m, plot.m, plot3.m, plotyy.m, quiver.m, stem.m, clf.m, copyobj.m, findobj.m, subplot.m, ppval.m, splinefit.m, ismember.m, freqz.m, unwrap.m, eigs.m, ichol.m, pcg.m, spdiags.m, svds.m, magic.m, lscov.m, median.m, ols.m, dec2base.m, strsplit.m, strtok.m, test.m, bug-31371.tst, bug-36025.tst, bug-44940.tst, build-sparse-tests.sh, class-concat.tst, classdef.tst, classes.tst, colormaps.tst, command.tst, ctor-vs-method.tst, error.tst, fcn-handle-derived-resolution.tst, for.tst, index.tst, io.tst, jit.tst, null-assign.tst, parser.tst, struct.tst, system.tst: Add semicolons to terminate code in %! blocks.
author Rik <rik@octave.org>
date Fri, 01 Apr 2016 16:03:29 -0700
parents 3ec8332e0e01
children c86cacc3aaf4
comparison
equal deleted inserted replaced
21579:0d1bd2ede0c1 21580:ecce63c99c3f
152 152
153 ## test PixelRegion option 153 ## test PixelRegion option
154 %!testif HAVE_MAGICK 154 %!testif HAVE_MAGICK
155 %! w = randi (255, 100, 100, "uint8"); 155 %! w = randi (255, 100, 100, "uint8");
156 %! [r, cmap, a] = write_and_read (w, "tif", "PixelRegion", {[50 70] [20 40]}); 156 %! [r, cmap, a] = write_and_read (w, "tif", "PixelRegion", {[50 70] [20 40]});
157 %! assert (r, w(50:70, 20:40)) 157 %! assert (r, w(50:70, 20:40));
158 %! [r, cmap, a] = write_and_read (w, "tif", "PixelRegion", {[50 2 70] [20 3 40]}); 158 %! [r, cmap, a] = write_and_read (w, "tif", "PixelRegion", {[50 2 70] [20 3 40]});
159 %! assert (r, w(50:2:70, 20:3:40)) 159 %! assert (r, w(50:2:70, 20:3:40));
160 160
161 ## If a file does not exist, it's the job of imread to check the file 161 ## If a file does not exist, it's the job of imread to check the file
162 ## exists before sending it over to __imread__ or whatever function 162 ## exists before sending it over to __imread__ or whatever function
163 ## is defined in imformats to handle that specific format. This is the 163 ## is defined in imformats to handle that specific format. This is the
164 ## same in imfinfo. So in this test we replace one format in imformats 164 ## same in imfinfo. So in this test we replace one format in imformats
208 %! im = zeros ([16 16 3], "uint8"); 208 %! im = zeros ([16 16 3], "uint8");
209 %! im(:,:,1) = 255; 209 %! im(:,:,1) = 255;
210 %! im(:,:,3) = repmat (0:16:255, [16 1]); 210 %! im(:,:,3) = repmat (0:16:255, [16 1]);
211 %! [r, cmap, a] = write_and_read (im, "png"); 211 %! [r, cmap, a] = write_and_read (im, "png");
212 %! assert (class (r), "uint8"); 212 %! assert (class (r), "uint8");
213 %! assert (isempty (cmap)) 213 %! assert (isempty (cmap));
214 %! assert (isempty (a)) 214 %! assert (isempty (a));