Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dlib
Commits
e64ea42f
You need to sign in or sign up before continuing.
Commit
e64ea42f
authored
Jul 15, 2021
by
Davis King
Browse files
remove dead code
parent
7d8c6a11
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
30 deletions
+0
-30
dlib/image_loader/image_loader.h
dlib/image_loader/image_loader.h
+0
-30
No files found.
dlib/image_loader/image_loader.h
View file @
e64ea42f
...
...
@@ -46,17 +46,11 @@ namespace dlib
int32
biHeight
;
unsigned
short
biBitCount
;
unsigned
long
biCompression
;
/*
unsigned long biSizeImage;
unsigned long biClrUsed;
unsigned long biClrImportant;
*/
unsigned
long
a
,
b
,
c
,
d
,
i
;
using
namespace
std
;
streambuf
&
in
=
*
in_
.
rdbuf
();
// streamsize num;
unsigned
char
buf
[
100
];
...
...
@@ -114,34 +108,10 @@ namespace dlib
a
=
buf
[
i
];
b
=
buf
[
i
+
1
];
c
=
buf
[
i
+
2
];
d
=
buf
[
i
+
3
];
biCompression
=
a
|
(
b
<<
8
)
|
(
c
<<
16
)
|
(
d
<<
24
);
/*
i += 4;
a = buf[i]; b = buf[i+1]; c = buf[i+2]; d = buf[i+3];
biSizeImage = a | (b<<8) | (c<<16) | (d<<24);
i += 4+4+4;
a = buf[i]; b = buf[i+1]; c = buf[i+2]; d = buf[i+3];
biClrUsed = a | (b<<8) | (c<<16) | (d<<24);
i += 4;
a = buf[i]; b = buf[i+1]; c = buf[i+2]; d = buf[i+3];
biClrImportant = a | (b<<8) | (c<<16) | (d<<24);
*/
if
(
biSize
!=
40
)
throw
image_load_error
(
"bmp load error 6: header too small"
);
// read and discard any extra bytes that are part of the header
if
(
biSize
>
40
)
{
if
(
in
.
sgetn
(
reinterpret_cast
<
char
*>
(
buf
),
biSize
-
40
)
!=
static_cast
<
long
>
(
biSize
-
40
))
{
throw
image_load_error
(
"bmp load error 7: header too small"
);
}
bytes_read_so_far
+=
biSize
-
40
;
}
image
.
set_size
(
biHeight
,
biWidth
);
switch
(
biBitCount
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment