Correction of surface buffer size

fixed case when bpp > 8.
Merge remote-tracking branch 'supsuperorgin/master' into smaster
Merge pull request #651 from Yankes/FixSurface

Fix surface (again)