This is a static copy of a profile report

Home

imagesci\private\imbmpinfo>getVersion (1 call, 0.000 sec)
Generated 15-Mar-2007 12:01:57 using real time.
M-subfunction in file C:\Program Files\MATLAB71\toolbox\matlab\imagesci\private\imbmpinfo.m
[Copy to new window for comparing multiple runs]

Parents (calling functions)

Function NameFunction TypeCalls
imagesci\private\imbmpinfoM-function1
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
116
msg = '';
10.000 s49.6%
138
bmpVersion = 'win 3';
10.000 s49.5%
134
case 12
10.000 s0.6%
133
switch headersize
10.000 s0.1%
137
case 40
10.000 s0.1%
Other lines & overhead  0 s0%
Totals  0.000 s100% 
Children (called functions)
No children
M-Lint results
Line numberMessage
Coverage results
[ Show coverage for parent directory ]
Total lines in file63
Non-code lines (comments, blank lines)29
Code lines (lines that can run)34
Code lines that did run10
Code lines that did not run24
Coverage (did run/can run)29.41 %
Function listing
   time   calls  line
108 function [bmpVersion, msg] = getVersion(fid, FormatSignature)
109 %GETVERSION Determine the version of the BMP file.
110
111 %
112 % Use the algorithm from Encyclopedia of Graphics File Formats,
113 % 2ed, pp. 584-585
114 %
115
< 0.01 1 116 msg = '';
117
1 118 switch FormatSignature
1 119 case 'BM'
120
121 % We have a single-image BMP file. It may be
122 % a Windows or an OS/2 file.
123
1 124 fseek(fid, 14, 'bof');
1 125 headersize = fread(fid, 1, 'uint32');
126
1 127 if (isempty(headersize))
128 bmpVersion = '';
129 msg = 'Truncated header';
130 return;
131 end
132
< 0.01 1 133 switch headersize
< 0.01 1 134 case 12
135 bmpVersion = 'win 2';
136
< 0.01 1 137 case 40
< 0.01 1 138 bmpVersion = 'win 3';
139
140 case 108
141 bmpVersion = 'win 4';
142
143 case 124
144 bmpVersion = 'win 5';
145
146 otherwise
147
148 if ((headersize > 12) && (headersize <= 64))
149 bmpVersion = 'OS2 2';
150 else
151 bmpVersion = '';
152 msg = 'Corrupted header';
153 end
154
155 end
156
157 case 'BA'
158
159 bmpVersion = '';
160 msg = 'Unsupported format; may be an OS/2 bitmap array';
161
162 otherwise
163
164 bmpVersion = '';
165 msg = 'Not a BMP file';
166
167 end
168
169
170

Other subfunctions in this file are not included in this listing.