More accurate bytesPerRow calculation