Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2017
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.24 KB | None | 0 0
  1. int CImgProc::getAlignedWidth()
  2. {
  3.     if (fileBuffer == nullptr)
  4.         return -1;
  5.  
  6.     int bitCountMultiplier = infoPtr->bmiHeader.biBitCount / 8;
  7.     int width = bitCountMultiplier * GetWidth();
  8.     return width % 4 == 0 ? width : width + 4 - width % 4;
  9. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement