This is a static copy of a profile reportHome
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)
Lines where the most time was spent
Line Number | Code | Calls | Total Time | % Time | Time Plot |
54 | [info, msg] = readBMPInfo(fid,... | 1 | 0.016 s | 100.0% |  |
65 | [info, msg] = postProcess(info... | 1 | 0 s | 0% |  |
64 | fclose(fid); | 1 | 0 s | 0% |  |
56 | if (~isempty(msg)) | 1 | 0 s | 0% |  |
46 | if (~isempty(msg)) | 1 | 0 s | 0% |  |
Other lines & overhead | | | 0 s | 0% |  |
Totals | | | 0.016 s | 100% | |
Children (called functions)
M-Lint results
Coverage results
[ Show coverage for parent directory ]
Total lines in file | 68 |
Non-code lines (comments, blank lines) | 36 |
Code lines (lines that can run) | 32 |
Code lines that did run | 12 |
Code lines that did not run | 20 |
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.