Changed CopyImage to accept desiredX, desiredY and LR_COPYFROMRESOURCE.