annotate scripts/image/imfinfo.m @ 17170:d6499c14021c

doc: Periodic grammarcheck of documentation. * doc/interpreter/basics.txi, doc/interpreter/expr.txi, doc/interpreter/install.txi, doc/interpreter/java.txi, doc/interpreter/plot.txi, doc/interpreter/sparse.txi, doc/interpreter/vectorize.txi, libinterp/corefcn/cellfun.cc, libinterp/corefcn/debug.cc, libinterp/corefcn/file-io.cc, libinterp/corefcn/load-save.cc, libinterp/corefcn/matrix_type.cc, libinterp/corefcn/pr-output.cc, libinterp/parse-tree/oct-parse.in.yy, liboctave/numeric/LSODE-opts.in, scripts/image/imformats.m, scripts/image/imread.m, scripts/image/imwrite.m, scripts/miscellaneous/error_ids.m, scripts/miscellaneous/fileattrib.m, scripts/miscellaneous/mex.m, scripts/miscellaneous/mkoctfile.m, scripts/miscellaneous/warning_ids.m, scripts/prefs/prefdir.m, scripts/prefs/preferences.m, scripts/signal/fftfilt.m, scripts/strings/isstrprop.m, scripts/testfun/assert.m: Periodic grammarcheck of documentation.
author Rik <rik@octave.org>
date Sun, 04 Aug 2013 13:08:39 -0700
parents 3db796f89695
children bc924baa2c4e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
16768
e2de3c8882be copyright notice fixes
John W. Eaton <jwe@octave.org>
parents: 15683
diff changeset
1 ## Copyright (C) 2008-2012 Soren Hauberg
8144
01fac748b680 Add the 'imfinfo' function for reading image file information.
sh@sh-laptop
parents:
diff changeset
2 ##
01fac748b680 Add the 'imfinfo' function for reading image file information.
sh@sh-laptop
parents:
diff changeset
3 ## This file is part of Octave.
01fac748b680 Add the 'imfinfo' function for reading image file information.
sh@sh-laptop
parents:
diff changeset
4 ##
01fac748b680 Add the 'imfinfo' function for reading image file information.
sh@sh-laptop
parents:
diff changeset
5 ## Octave is free software; you can redistribute it and/or modify it
01fac748b680 Add the 'imfinfo' function for reading image file information.
sh@sh-laptop
parents:
diff changeset
6 ## under the terms of the GNU General Public License as published by
01fac748b680 Add the 'imfinfo' function for reading image file information.
sh@sh-laptop
parents:
diff changeset
7 ## the Free Software Foundation; either version 3 of the License, or (at
01fac748b680 Add the 'imfinfo' function for reading image file information.
sh@sh-laptop
parents:
diff changeset
8 ## your option) any later version.
01fac748b680 Add the 'imfinfo' function for reading image file information.
sh@sh-laptop
parents:
diff changeset
9 ##
01fac748b680 Add the 'imfinfo' function for reading image file information.
sh@sh-laptop
parents:
diff changeset
10 ## Octave is distributed in the hope that it will be useful, but
01fac748b680 Add the 'imfinfo' function for reading image file information.
sh@sh-laptop
parents:
diff changeset
11 ## WITHOUT ANY WARRANTY; without even the implied warranty of
01fac748b680 Add the 'imfinfo' function for reading image file information.
sh@sh-laptop
parents:
diff changeset
12 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
01fac748b680 Add the 'imfinfo' function for reading image file information.
sh@sh-laptop
parents:
diff changeset
13 ## General Public License for more details.
01fac748b680 Add the 'imfinfo' function for reading image file information.
sh@sh-laptop
parents:
diff changeset
14 ##
01fac748b680 Add the 'imfinfo' function for reading image file information.
sh@sh-laptop
parents:
diff changeset
15 ## You should have received a copy of the GNU General Public License
01fac748b680 Add the 'imfinfo' function for reading image file information.
sh@sh-laptop
parents:
diff changeset
16 ## along with Octave; see the file COPYING. If not, see
01fac748b680 Add the 'imfinfo' function for reading image file information.
sh@sh-laptop
parents:
diff changeset
17 ## <http://www.gnu.org/licenses/>.
01fac748b680 Add the 'imfinfo' function for reading image file information.
sh@sh-laptop
parents:
diff changeset
18
01fac748b680 Add the 'imfinfo' function for reading image file information.
sh@sh-laptop
parents:
diff changeset
19 ## -*- texinfo -*-
9143
74d5c1a4ca96 Eliminate 'unbalanced parentheses in @def...' error during texi2pdf.
Rik <rdrider0-list@yahoo.com>
parents: 9051
diff changeset
20 ## @deftypefn {Function File} {@var{info} =} imfinfo (@var{filename})
16944
1b3b3ee88284 Add optional extension argument to image IO functions.
Carnë Draug <carandraug@octave.org>
parents: 16906
diff changeset
21 ## @deftypefnx {Function File} {@var{info} =} imfinfo (@var{filename}, @var{ext})
9143
74d5c1a4ca96 Eliminate 'unbalanced parentheses in @def...' error during texi2pdf.
Rik <rdrider0-list@yahoo.com>
parents: 9051
diff changeset
22 ## @deftypefnx {Function File} {@var{info} =} imfinfo (@var{url})
8144
01fac748b680 Add the 'imfinfo' function for reading image file information.
sh@sh-laptop
parents:
diff changeset
23 ## Read image information from a file.
01fac748b680 Add the 'imfinfo' function for reading image file information.
sh@sh-laptop
parents:
diff changeset
24 ##
01fac748b680 Add the 'imfinfo' function for reading image file information.
sh@sh-laptop
parents:
diff changeset
25 ## @code{imfinfo} returns a structure containing information about the image
16944
1b3b3ee88284 Add optional extension argument to image IO functions.
Carnë Draug <carandraug@octave.org>
parents: 16906
diff changeset
26 ## stored in the file @var{filename}. If there is no file @var{filename},
1b3b3ee88284 Add optional extension argument to image IO functions.
Carnë Draug <carandraug@octave.org>
parents: 16906
diff changeset
27 ## and @var{ext} was specified, it will look for a file named @var{filename}
1b3b3ee88284 Add optional extension argument to image IO functions.
Carnë Draug <carandraug@octave.org>
parents: 16906
diff changeset
28 ## and extension @var{ext}, i.e., a file named @var{filename}.@var{ext}.
1b3b3ee88284 Add optional extension argument to image IO functions.
Carnë Draug <carandraug@octave.org>
parents: 16906
diff changeset
29 ##
1b3b3ee88284 Add optional extension argument to image IO functions.
Carnë Draug <carandraug@octave.org>
parents: 16906
diff changeset
30 ## The output structure @var{info} contains the following fields:
8144
01fac748b680 Add the 'imfinfo' function for reading image file information.
sh@sh-laptop
parents:
diff changeset
31 ##
01fac748b680 Add the 'imfinfo' function for reading image file information.
sh@sh-laptop
parents:
diff changeset
32 ## @table @samp
01fac748b680 Add the 'imfinfo' function for reading image file information.
sh@sh-laptop
parents:
diff changeset
33 ## @item Filename
01fac748b680 Add the 'imfinfo' function for reading image file information.
sh@sh-laptop
parents:
diff changeset
34 ## The full name of the image file.
10821
693e22af08ae Grammarcheck documentation of m-files
Rik <octave@nomad.inbox5.com>
parents: 10793
diff changeset
35 ##
8144
01fac748b680 Add the 'imfinfo' function for reading image file information.
sh@sh-laptop
parents:
diff changeset
36 ## @item FileSize
01fac748b680 Add the 'imfinfo' function for reading image file information.
sh@sh-laptop
parents:
diff changeset
37 ## Number of bytes of the image on disk
10821
693e22af08ae Grammarcheck documentation of m-files
Rik <octave@nomad.inbox5.com>
parents: 10793
diff changeset
38 ##
8144
01fac748b680 Add the 'imfinfo' function for reading image file information.
sh@sh-laptop
parents:
diff changeset
39 ## @item FileModDate
01fac748b680 Add the 'imfinfo' function for reading image file information.
sh@sh-laptop
parents:
diff changeset
40 ## Date of last modification to the file.
10821
693e22af08ae Grammarcheck documentation of m-files
Rik <octave@nomad.inbox5.com>
parents: 10793
diff changeset
41 ##
8144
01fac748b680 Add the 'imfinfo' function for reading image file information.
sh@sh-laptop
parents:
diff changeset
42 ## @item Height
01fac748b680 Add the 'imfinfo' function for reading image file information.
sh@sh-laptop
parents:
diff changeset
43 ## Image height in pixels.
10821
693e22af08ae Grammarcheck documentation of m-files
Rik <octave@nomad.inbox5.com>
parents: 10793
diff changeset
44 ##
8144
01fac748b680 Add the 'imfinfo' function for reading image file information.
sh@sh-laptop
parents:
diff changeset
45 ## @item Width
01fac748b680 Add the 'imfinfo' function for reading image file information.
sh@sh-laptop
parents:
diff changeset
46 ## Image Width in pixels.
10821
693e22af08ae Grammarcheck documentation of m-files
Rik <octave@nomad.inbox5.com>
parents: 10793
diff changeset
47 ##
8144
01fac748b680 Add the 'imfinfo' function for reading image file information.
sh@sh-laptop
parents:
diff changeset
48 ## @item BitDepth
01fac748b680 Add the 'imfinfo' function for reading image file information.
sh@sh-laptop
parents:
diff changeset
49 ## Number of bits per channel per pixel.
10821
693e22af08ae Grammarcheck documentation of m-files
Rik <octave@nomad.inbox5.com>
parents: 10793
diff changeset
50 ##
8144
01fac748b680 Add the 'imfinfo' function for reading image file information.
sh@sh-laptop
parents:
diff changeset
51 ## @item Format
9051
1bf0ce0930be Grammar check TexInfo in all .m files
Rik <rdrider0-list@yahoo.com>
parents: 8920
diff changeset
52 ## Image format (e.g., @code{"jpeg"}).
10821
693e22af08ae Grammarcheck documentation of m-files
Rik <octave@nomad.inbox5.com>
parents: 10793
diff changeset
53 ##
8144
01fac748b680 Add the 'imfinfo' function for reading image file information.
sh@sh-laptop
parents:
diff changeset
54 ## @item LongFormat
01fac748b680 Add the 'imfinfo' function for reading image file information.
sh@sh-laptop
parents:
diff changeset
55 ## Long form image format description.
10821
693e22af08ae Grammarcheck documentation of m-files
Rik <octave@nomad.inbox5.com>
parents: 10793
diff changeset
56 ##
8144
01fac748b680 Add the 'imfinfo' function for reading image file information.
sh@sh-laptop
parents:
diff changeset
57 ## @item XResolution
01fac748b680 Add the 'imfinfo' function for reading image file information.
sh@sh-laptop
parents:
diff changeset
58 ## X resolution of the image.
10821
693e22af08ae Grammarcheck documentation of m-files
Rik <octave@nomad.inbox5.com>
parents: 10793
diff changeset
59 ##
8144
01fac748b680 Add the 'imfinfo' function for reading image file information.
sh@sh-laptop
parents:
diff changeset
60 ## @item YResolution
01fac748b680 Add the 'imfinfo' function for reading image file information.
sh@sh-laptop
parents:
diff changeset
61 ## Y resolution of the image.
10821
693e22af08ae Grammarcheck documentation of m-files
Rik <octave@nomad.inbox5.com>
parents: 10793
diff changeset
62 ##
8144
01fac748b680 Add the 'imfinfo' function for reading image file information.
sh@sh-laptop
parents:
diff changeset
63 ## @item TotalColors
01fac748b680 Add the 'imfinfo' function for reading image file information.
sh@sh-laptop
parents:
diff changeset
64 ## Number of unique colors in the image.
10821
693e22af08ae Grammarcheck documentation of m-files
Rik <octave@nomad.inbox5.com>
parents: 10793
diff changeset
65 ##
8144
01fac748b680 Add the 'imfinfo' function for reading image file information.
sh@sh-laptop
parents:
diff changeset
66 ## @item TileName
01fac748b680 Add the 'imfinfo' function for reading image file information.
sh@sh-laptop
parents:
diff changeset
67 ## Tile name.
10821
693e22af08ae Grammarcheck documentation of m-files
Rik <octave@nomad.inbox5.com>
parents: 10793
diff changeset
68 ##
8144
01fac748b680 Add the 'imfinfo' function for reading image file information.
sh@sh-laptop
parents:
diff changeset
69 ## @item AnimationDelay
01fac748b680 Add the 'imfinfo' function for reading image file information.
sh@sh-laptop
parents:
diff changeset
70 ## Time in 1/100ths of a second (0 to 65535) which must expire before displaying
01fac748b680 Add the 'imfinfo' function for reading image file information.
sh@sh-laptop
parents:
diff changeset
71 ## the next image in an animated sequence.
10821
693e22af08ae Grammarcheck documentation of m-files
Rik <octave@nomad.inbox5.com>
parents: 10793
diff changeset
72 ##
8144
01fac748b680 Add the 'imfinfo' function for reading image file information.
sh@sh-laptop
parents:
diff changeset
73 ## @item AnimationIterations
10793
be55736a0783 Grammarcheck the documentation from m-files.
Rik <octave@nomad.inbox5.com>
parents: 10433
diff changeset
74 ## Number of iterations to loop an animation (e.g., Netscape loop extension)
be55736a0783 Grammarcheck the documentation from m-files.
Rik <octave@nomad.inbox5.com>
parents: 10433
diff changeset
75 ## for.
10821
693e22af08ae Grammarcheck documentation of m-files
Rik <octave@nomad.inbox5.com>
parents: 10793
diff changeset
76 ##
8144
01fac748b680 Add the 'imfinfo' function for reading image file information.
sh@sh-laptop
parents:
diff changeset
77 ## @item ByteOrder
15683
806ea52af230 Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents: 14138
diff changeset
78 ## Endian option for formats that support it. Value is @code{"little-endian"},
8144
01fac748b680 Add the 'imfinfo' function for reading image file information.
sh@sh-laptop
parents:
diff changeset
79 ## @code{"big-endian"}, or @code{"undefined"}.
10821
693e22af08ae Grammarcheck documentation of m-files
Rik <octave@nomad.inbox5.com>
parents: 10793
diff changeset
80 ##
8144
01fac748b680 Add the 'imfinfo' function for reading image file information.
sh@sh-laptop
parents:
diff changeset
81 ## @item Gamma
9051
1bf0ce0930be Grammar check TexInfo in all .m files
Rik <rdrider0-list@yahoo.com>
parents: 8920
diff changeset
82 ## Gamma level of the image. The same color image displayed on two different
1bf0ce0930be Grammar check TexInfo in all .m files
Rik <rdrider0-list@yahoo.com>
parents: 8920
diff changeset
83 ## workstations may look different due to differences in the display monitor.
10821
693e22af08ae Grammarcheck documentation of m-files
Rik <octave@nomad.inbox5.com>
parents: 10793
diff changeset
84 ##
8144
01fac748b680 Add the 'imfinfo' function for reading image file information.
sh@sh-laptop
parents:
diff changeset
85 ## @item Matte
01fac748b680 Add the 'imfinfo' function for reading image file information.
sh@sh-laptop
parents:
diff changeset
86 ## @code{true} if the image has transparency.
10821
693e22af08ae Grammarcheck documentation of m-files
Rik <octave@nomad.inbox5.com>
parents: 10793
diff changeset
87 ##
8144
01fac748b680 Add the 'imfinfo' function for reading image file information.
sh@sh-laptop
parents:
diff changeset
88 ## @item ModulusDepth
10793
be55736a0783 Grammarcheck the documentation from m-files.
Rik <octave@nomad.inbox5.com>
parents: 10433
diff changeset
89 ## Image modulus depth (minimum number of bits required to support
15683
806ea52af230 Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents: 14138
diff changeset
90 ## red/green/blue components without loss of accuracy).
10821
693e22af08ae Grammarcheck documentation of m-files
Rik <octave@nomad.inbox5.com>
parents: 10793
diff changeset
91 ##
8144
01fac748b680 Add the 'imfinfo' function for reading image file information.
sh@sh-laptop
parents:
diff changeset
92 ## @item Quality
01fac748b680 Add the 'imfinfo' function for reading image file information.
sh@sh-laptop
parents:
diff changeset
93 ## JPEG/MIFF/PNG compression level.
10821
693e22af08ae Grammarcheck documentation of m-files
Rik <octave@nomad.inbox5.com>
parents: 10793
diff changeset
94 ##
8144
01fac748b680 Add the 'imfinfo' function for reading image file information.
sh@sh-laptop
parents:
diff changeset
95 ## @item QuantizeColors
01fac748b680 Add the 'imfinfo' function for reading image file information.
sh@sh-laptop
parents:
diff changeset
96 ## Preferred number of colors in the image.
10821
693e22af08ae Grammarcheck documentation of m-files
Rik <octave@nomad.inbox5.com>
parents: 10793
diff changeset
97 ##
8144
01fac748b680 Add the 'imfinfo' function for reading image file information.
sh@sh-laptop
parents:
diff changeset
98 ## @item ResolutionUnits
15683
806ea52af230 Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents: 14138
diff changeset
99 ## Units of image resolution. Value is @code{"pixels per inch"},
8144
01fac748b680 Add the 'imfinfo' function for reading image file information.
sh@sh-laptop
parents:
diff changeset
100 ## @code{"pixels per centimeter"}, or @code{"undefined"}.
10821
693e22af08ae Grammarcheck documentation of m-files
Rik <octave@nomad.inbox5.com>
parents: 10793
diff changeset
101 ##
8144
01fac748b680 Add the 'imfinfo' function for reading image file information.
sh@sh-laptop
parents:
diff changeset
102 ## @item ColorType
15683
806ea52af230 Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents: 14138
diff changeset
103 ## Image type. Value is @code{"grayscale"}, @code{"indexed"},
806ea52af230 Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents: 14138
diff changeset
104 ## @code{"truecolor"}, or @code{"undefined"}.
10821
693e22af08ae Grammarcheck documentation of m-files
Rik <octave@nomad.inbox5.com>
parents: 10793
diff changeset
105 ##
8144
01fac748b680 Add the 'imfinfo' function for reading image file information.
sh@sh-laptop
parents:
diff changeset
106 ## @item View
01fac748b680 Add the 'imfinfo' function for reading image file information.
sh@sh-laptop
parents:
diff changeset
107 ## FlashPix viewing parameters.
01fac748b680 Add the 'imfinfo' function for reading image file information.
sh@sh-laptop
parents:
diff changeset
108 ## @end table
01fac748b680 Add the 'imfinfo' function for reading image file information.
sh@sh-laptop
parents:
diff changeset
109 ##
16944
1b3b3ee88284 Add optional extension argument to image IO functions.
Carnë Draug <carandraug@octave.org>
parents: 16906
diff changeset
110 ## @seealso{imread, imwrite, imshow, imformats}
8144
01fac748b680 Add the 'imfinfo' function for reading image file information.
sh@sh-laptop
parents:
diff changeset
111 ## @end deftypefn
01fac748b680 Add the 'imfinfo' function for reading image file information.
sh@sh-laptop
parents:
diff changeset
112
16768
e2de3c8882be copyright notice fixes
John W. Eaton <jwe@octave.org>
parents: 15683
diff changeset
113 ## Author: Soren Hauberg <hauberg@gmail.com>
e2de3c8882be copyright notice fixes
John W. Eaton <jwe@octave.org>
parents: 15683
diff changeset
114
16944
1b3b3ee88284 Add optional extension argument to image IO functions.
Carnë Draug <carandraug@octave.org>
parents: 16906
diff changeset
115 function info = imfinfo (varargin)
1b3b3ee88284 Add optional extension argument to image IO functions.
Carnë Draug <carandraug@octave.org>
parents: 16906
diff changeset
116 if (nargin < 1 || nargin > 2)
8144
01fac748b680 Add the 'imfinfo' function for reading image file information.
sh@sh-laptop
parents:
diff changeset
117 print_usage ();
16944
1b3b3ee88284 Add optional extension argument to image IO functions.
Carnë Draug <carandraug@octave.org>
parents: 16906
diff changeset
118 elseif (! ischar (varargin{1}))
11472
1740012184f9 Use uppercase for variable names in error() strings to match Info documentation. Only m-files done.
Rik <octave@nomad.inbox5.com>
parents: 10821
diff changeset
119 error ("imfinfo: FILENAME must be a string");
16944
1b3b3ee88284 Add optional extension argument to image IO functions.
Carnë Draug <carandraug@octave.org>
parents: 16906
diff changeset
120 elseif (nargin > 1 && ! ischar (varargin{2}))
1b3b3ee88284 Add optional extension argument to image IO functions.
Carnë Draug <carandraug@octave.org>
parents: 16906
diff changeset
121 error ("imfinfo: EXT must be a string");
8144
01fac748b680 Add the 'imfinfo' function for reading image file information.
sh@sh-laptop
parents:
diff changeset
122 endif
17086
3db796f89695 Rename private core_imfnc functions to follow the __fnc__ convention style.
Carnë Draug <carandraug@octave.org>
parents: 16966
diff changeset
123 info = imageIO (@__imfinfo__, "info", varargin, varargin{:});
8144
01fac748b680 Add the 'imfinfo' function for reading image file information.
sh@sh-laptop
parents:
diff changeset
124 endfunction