rasterToHWSprite function

Convert a raster object into an hardwareSprite object