Fix the cropping behaviour of ImageData.CreateBitmap

CreateBitmap takes arguments which allow you to crop an image to retain
only a segment. However the LockBits copy command was not doing this: it
was copying all the bytes over to the new file until the new file was
full, resulting in a skewed image. Also, it ignored the bitmap format,
resulting in messed up colours with 32bit bmps.
I've rewritten the CreateBitmap method to first create a bitmap of the
data stored in ImageData and then crop it using C#'s graphics libraries.