This is a static copy of a profile reportHome
imagesci\private\readbmpdata (1 call, 0.047 sec)
Generated 15-Mar-2007 12:01:59 using real time.
M-function in file C:\Program Files\MATLAB71\toolbox\matlab\imagesci\private\readbmpdata.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 |
34 | X = bmpReadData24(filename, of... | 1 | 0.031 s | 66.7% |  |
18 | case 'none' | 1 | 0.016 s | 33.3% |  |
14 | filename = info.Filename; | 1 | 0.000 s | 0.0% |  |
11 | offset = info.ImageDataOffset; | 1 | 0.000 s | 0.0% |  |
13 | height = info.Height; | 1 | 0.000 s | 0.0% |  |
Other lines & overhead | | | 0 s | 0% |  |
Totals | | | 0.047 s | 100% | |
Children (called functions)
M-Lint results
Coverage results
[ Show coverage for parent directory ]
Total lines in file | 63 |
Non-code lines (comments, blank lines) | 32 |
Code lines (lines that can run) | 31 |
Code lines that did run | 13 |
Code lines that did not run | 18 |
Coverage (did run/can run) | 41.94 % |
Function listing
time calls line
1 function X = readbmpdata(info)
2 %READBMPDATA Read bitmap data
3 % X = readbmpdata(INFO) reads image data from a BMP file. INFO is a
4 % structure returned by IMBMPINFO. X is a uint8 array that is 2-D for
5 % 1-bit, 4-bit, and 8-bit image data. X is M-by-N-by-3 for 24-bit and
6 % 32-bit image data.
7
8 % Copyright 1984-2002 The MathWorks, Inc.
9 % $Revision: 1.1.6.2 $ $Date: 2004/02/01 22:04:43 $
10
< 0.01 1 11 offset = info.ImageDataOffset;
< 0.01 1 12 width = info.Width;
< 0.01 1 13 height = info.Height;
< 0.01 1 14 filename = info.Filename;
15
1 16 switch info.CompressionType
17
0.02 1 18 case 'none'
19
1 20 switch info.BitDepth
1 21 case 1
22 X = logical(bmpReadData1(filename, offset, width, height));
23
1 24 case 4
25 X = bmpReadData4(filename, offset, width, height);
26
1 27 case 8
28 X = bmpReadData8(filename, offset, width, height);
29
1 30 case 16
31 X = bmpReadData16(filename, offset, width, height);
32
1 33 case 24
0.03 1 34 X = bmpReadData24(filename, offset, width, height);
35
36 case 32
37 X = bmpReadData32(filename, offset, width, height);
38
39 end
40
41 case '8-bit RLE'
42 X = bmpReadData8RLE(filename, offset, width, height);
43
44 case '4-bit RLE'
45 X = bmpReadData4RLE(filename, offset, width, height);
46
47 case 'bitfields'
48 error('MATLAB:readbmpdata:bitfieldsCompression', ...
49 'Bitfield compression not supported');
50
51 case 'Huffman 1D'
52 error('MATLAB:readbmpdata:huffman1dCompression', ...
53 'Huffman 1D compression not supported');
54
55 case '24-bit RLE'
56 error('MATLAB:readbmpdata:rle24BitCompression', ...
57 '24-bit RLE compression not supported');
58
59 end
60
61 %%%
62 %%% bmpReadData8 --- read 8-bit bitmap data
63 %%%
Other subfunctions in this file are not included in this listing.