This also fixes a bug of accidentally multiplying the stride by 4 when the stride is already in bytes and not pixels.
host