Mercurial > octave
annotate scripts/image/private/colorspace_conversion_revert.m @ 21562:6c2fd62db1f7
maint: Eliminate accidental double spaces in code.
* make_int.cc, file-editor-tab.h, file-editor.cc, shortcut-manager.h,
__contourc__.cc, cellfun.cc, debug.cc, errwarn.h, graphics.in.h, jit-ir.h,
oct-stream.cc, quadcc.cc, qz.cc, sparse-xdiv.cc, symtab.cc, __init_fltk__.cc,
ov-class.cc, ov-float.h, ov-scalar.h, op-int.h, CNDArray.cc, CSparse.cc,
MSparse.cc, Sparse.cc, boolNDArray.cc, chNDArray.cc, dNDArray.cc, dSparse.cc,
fCNDArray.cc, fNDArray.cc, int16NDArray.cc, int32NDArray.cc, int64NDArray.cc,
int8NDArray.cc, intNDArray.cc, uint16NDArray.cc, uint32NDArray.cc,
uint64NDArray.cc, uint8NDArray.cc, randgamma.h, randmtzig.h, randpoisson.c,
randpoisson.h, Sparse-op-defs.h, oct-time.cc, kpse.cc, lo-array-errwarn.h,
lo-ieee.h, del2.m, num2str.m, __isequal__.m, lookfor.m, hsv2rgb.m,
colorspace_conversion_revert.m, fminbnd.m, create_pkgadddel.m, shading.m,
struct2hdl.m, gallery.m, discrete_cdf.m, kolmogorov_smirnov_test.m, assert.m,
datestr.m, classes.tst, jit.tst:
Eliminate accidental double spaces in code.
author | Rik <rik@octave.org> |
---|---|
date | Wed, 30 Mar 2016 15:19:12 -0700 |
parents | 1672bb8882dd |
children | ffad2baa90f7 |
rev | line source |
---|---|
20369
131ce8cfaa80
Relax input in functions that convert between colorspaces (bug #45456)
Carnë Draug <carandraug@octave.org>
parents:
diff
changeset
|
1 ## Copyright (C) 2015 Carnë Draug <carandraug+dev@gmail.com> |
131ce8cfaa80
Relax input in functions that convert between colorspaces (bug #45456)
Carnë Draug <carandraug@octave.org>
parents:
diff
changeset
|
2 ## |
131ce8cfaa80
Relax input in functions that convert between colorspaces (bug #45456)
Carnë Draug <carandraug@octave.org>
parents:
diff
changeset
|
3 ## This file is part of Octave. |
131ce8cfaa80
Relax input in functions that convert between colorspaces (bug #45456)
Carnë Draug <carandraug@octave.org>
parents:
diff
changeset
|
4 ## |
131ce8cfaa80
Relax input in functions that convert between colorspaces (bug #45456)
Carnë Draug <carandraug@octave.org>
parents:
diff
changeset
|
5 ## Octave is free software; you can redistribute it and/or modify it |
131ce8cfaa80
Relax input in functions that convert between colorspaces (bug #45456)
Carnë Draug <carandraug@octave.org>
parents:
diff
changeset
|
6 ## under the terms of the GNU General Public License as published by |
131ce8cfaa80
Relax input in functions that convert between colorspaces (bug #45456)
Carnë Draug <carandraug@octave.org>
parents:
diff
changeset
|
7 ## the Free Software Foundation; either version 3 of the License, or (at |
131ce8cfaa80
Relax input in functions that convert between colorspaces (bug #45456)
Carnë Draug <carandraug@octave.org>
parents:
diff
changeset
|
8 ## your option) any later version. |
131ce8cfaa80
Relax input in functions that convert between colorspaces (bug #45456)
Carnë Draug <carandraug@octave.org>
parents:
diff
changeset
|
9 ## |
131ce8cfaa80
Relax input in functions that convert between colorspaces (bug #45456)
Carnë Draug <carandraug@octave.org>
parents:
diff
changeset
|
10 ## Octave is distributed in the hope that it will be useful, but |
131ce8cfaa80
Relax input in functions that convert between colorspaces (bug #45456)
Carnë Draug <carandraug@octave.org>
parents:
diff
changeset
|
11 ## WITHOUT ANY WARRANTY; without even the implied warranty of |
131ce8cfaa80
Relax input in functions that convert between colorspaces (bug #45456)
Carnë Draug <carandraug@octave.org>
parents:
diff
changeset
|
12 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
131ce8cfaa80
Relax input in functions that convert between colorspaces (bug #45456)
Carnë Draug <carandraug@octave.org>
parents:
diff
changeset
|
13 ## General Public License for more details. |
131ce8cfaa80
Relax input in functions that convert between colorspaces (bug #45456)
Carnë Draug <carandraug@octave.org>
parents:
diff
changeset
|
14 ## |
131ce8cfaa80
Relax input in functions that convert between colorspaces (bug #45456)
Carnë Draug <carandraug@octave.org>
parents:
diff
changeset
|
15 ## You should have received a copy of the GNU General Public License |
131ce8cfaa80
Relax input in functions that convert between colorspaces (bug #45456)
Carnë Draug <carandraug@octave.org>
parents:
diff
changeset
|
16 ## along with Octave; see the file COPYING. If not, see |
131ce8cfaa80
Relax input in functions that convert between colorspaces (bug #45456)
Carnë Draug <carandraug@octave.org>
parents:
diff
changeset
|
17 ## <http://www.gnu.org/licenses/>. |
131ce8cfaa80
Relax input in functions that convert between colorspaces (bug #45456)
Carnë Draug <carandraug@octave.org>
parents:
diff
changeset
|
18 |
131ce8cfaa80
Relax input in functions that convert between colorspaces (bug #45456)
Carnë Draug <carandraug@octave.org>
parents:
diff
changeset
|
19 ## Private function the functions that convert between color spaces, i.e., |
131ce8cfaa80
Relax input in functions that convert between colorspaces (bug #45456)
Carnë Draug <carandraug@octave.org>
parents:
diff
changeset
|
20 ## rgb2ntsc, rgb2hsv, hsv2rgb, and ntsc2rgb. This reverts a colormap type |
131ce8cfaa80
Relax input in functions that convert between colorspaces (bug #45456)
Carnë Draug <carandraug@octave.org>
parents:
diff
changeset
|
21 ## into the same shape and class as it was in the input. The flags are meant |
21562
6c2fd62db1f7
maint: Eliminate accidental double spaces in code.
Rik <rik@octave.org>
parents:
20676
diff
changeset
|
22 ## to come from complementary private function |
20369
131ce8cfaa80
Relax input in functions that convert between colorspaces (bug #45456)
Carnë Draug <carandraug@octave.org>
parents:
diff
changeset
|
23 ## colorspace_conversion_input_check() |
131ce8cfaa80
Relax input in functions that convert between colorspaces (bug #45456)
Carnë Draug <carandraug@octave.org>
parents:
diff
changeset
|
24 |
20676
1672bb8882dd
Remove unused arguments in private functions for colorspace arguments.
Carnë Draug <carandraug@octave.org>
parents:
20663
diff
changeset
|
25 function rv = colorspace_conversion_revert (rv, sz, is_im, is_nd) |
20369
131ce8cfaa80
Relax input in functions that convert between colorspaces (bug #45456)
Carnë Draug <carandraug@octave.org>
parents:
diff
changeset
|
26 if (is_im) |
131ce8cfaa80
Relax input in functions that convert between colorspaces (bug #45456)
Carnë Draug <carandraug@octave.org>
parents:
diff
changeset
|
27 if (is_nd) |
131ce8cfaa80
Relax input in functions that convert between colorspaces (bug #45456)
Carnë Draug <carandraug@octave.org>
parents:
diff
changeset
|
28 rv = reshape (rv, [sz(1:2) sz(4) sz(3)]); |
131ce8cfaa80
Relax input in functions that convert between colorspaces (bug #45456)
Carnë Draug <carandraug@octave.org>
parents:
diff
changeset
|
29 rv = permute (rv, [1 2 4 3]); |
131ce8cfaa80
Relax input in functions that convert between colorspaces (bug #45456)
Carnë Draug <carandraug@octave.org>
parents:
diff
changeset
|
30 else |
131ce8cfaa80
Relax input in functions that convert between colorspaces (bug #45456)
Carnë Draug <carandraug@octave.org>
parents:
diff
changeset
|
31 rv = reshape (rv, sz); |
131ce8cfaa80
Relax input in functions that convert between colorspaces (bug #45456)
Carnë Draug <carandraug@octave.org>
parents:
diff
changeset
|
32 endif |
131ce8cfaa80
Relax input in functions that convert between colorspaces (bug #45456)
Carnë Draug <carandraug@octave.org>
parents:
diff
changeset
|
33 endif |
131ce8cfaa80
Relax input in functions that convert between colorspaces (bug #45456)
Carnë Draug <carandraug@octave.org>
parents:
diff
changeset
|
34 endfunction |