This is a static copy of a profile report

Home

imagesci\private\imbmpinfo (1 call, 0.016 sec)
Generated 15-Mar-2007 12:01:57 using real time.
M-function 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\readbmpM-function1
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
54
[info, msg] = readBMPInfo(fid,...
10.016 s100.0%
65
[info, msg] = postProcess(info...
10 s0%
64
fclose(fid);
10 s0%
56
if (~isempty(msg))
10 s0%
46
if (~isempty(msg))
10 s0%
Other lines & overhead  0 s0%
Totals  0.016 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
imagesci\private\imbmpinfo>readBMPInfoM-subfunction10.016 s100.0%
ima...ate\imbmpinfo>initializeInfoStructM-subfunction10 s0%
imagesci\private\imbmpinfo>getSignatureM-subfunction10 s0%
imagesci\private\imbmpinfo>getVersionM-subfunction10 s0%
imagesci\private\imbmpinfo>postProcessM-subfunction10 s0%
Self time (built-ins, overhead, etc.)  0 s0%
Totals  0.016 s100% 
M-Lint results
Line numberMessage
Coverage results
[ Show coverage for parent directory ]
Total lines in file68
Non-code lines (comments, blank lines)36
Code lines (lines that can run)32
Code lines that did run12
Code lines that did not run20
Coverage (did run/can run)37.50 %
Function listing
   time   calls  line
1 function [info,msg] = imbmpinfo(filename)
2 %IMBMPINFO Get information about the image in a BMP file.
3 % [INFO,MSG] = IMBMPINFO(FILENAME) returns information about
4 % the image contained in a BMP file. If the attempt fails for
5 % some reason (e.g. the file does not exist or is not a BMP
6 % file), then INFO is empty and MSG is a string containing a
7 % diagnostic message.
8 %
9 % See also IMREAD, IMWRITE, IMFINFO.
10
11 % Copyright 1984-2002 The MathWorks, Inc.
12 % $Revision: 1.1.6.2 $ $Date: 2004/02/01 22:04:23 $
13
14 % Required reading before editing this file: Encyclopedia of
15 % Graphics File Formats, 2nd ed., pp. 572-591, pp. 630-650.
16
17 % This function should not call error()! -SLE
18
1 19 if (~ischar(filename))
20 msg = 'FILENAME must be a string';
21 return;
22 end
23
1 24 [fid,m] = fopen(filename, 'r', 'ieee-le'); % BMP files are little-endian
1 25 if (fid == -1)
26 info = [];
27 msg = m;
28 return;
29 end
30
1 31 info = initializeInfoStruct(fid);
32
33
34 % Determine how to read the bitmap.
1 35 info.FormatSignature = getSignature(fid);
36
1 37 if (isempty(info.FormatSignature))
38 info = [];
39 msg = 'Empty file';
40 fclose(fid);
41 return;
42 end
43
1 44 [bmpVersion, msg] = getVersion(fid, info.FormatSignature);
45
1 46 if (~isempty(msg))
47 info = [];
48 fclose(fid);
49 return
50 end
51
52
53 % Read the bitmap's info.
0.02 1 54 [info, msg] = readBMPInfo(fid, bmpVersion, info);
55
1 56 if (~isempty(msg))
57 info = [];
58 fclose(fid);
59 return
60 end
61
62
63 % Clean up and do post-processing.
1 64 fclose(fid);
1 65 [info, msg] = postProcess(info);
66
67
68

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