Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for various BMP headers and color depths #1435

Merged
merged 12 commits into from
Jun 10, 2019
Prev Previous commit
Next Next commit
Change parameter name
  • Loading branch information
Hakerh400 committed Jun 7, 2019
commit 621257ada0da3c2db3ecb72f128ed2d5c07cb936
6 changes: 3 additions & 3 deletions src/bmp/BMPParser.cc
Original file line number Diff line number Diff line change
Expand Up @@ -387,10 +387,10 @@ template <typename T, bool check> inline T Parser::get(){
return val;
}

template <typename T, bool check> inline T Parser::get(uint8_t* ptr){
template <typename T, bool check> inline T Parser::get(uint8_t* pointer){
if(check)
CHECK_OVERRUN(ptr, sizeof(T), T);
T val = *(T*)ptr;
CHECK_OVERRUN(pointer, sizeof(T), T);
T val = *(T*)pointer;
return val;
}

Expand Down
2 changes: 1 addition & 1 deletion src/bmp/BMPParser.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ namespace BMPParser{
std::string op = "";

template <typename T, bool check=true> inline T get();
template <typename T, bool check=true> inline T get(uint8_t* ptr);
template <typename T, bool check=true> inline T get(uint8_t* pointer);
std::string getStr(int len, bool reverse=false);
inline void skip(int len);
void calcMaskShift(uint32_t& shift, uint32_t& mask, double& multp);
Expand Down