 , bgrToRgb
 , rgbToBgr
 , cloneTo64F
-, unsafeImageTo32F 
-, unsafeImageTo64F 
-, unsafeImageTo8Bit 
+, unsafeImageTo32F
+, unsafeImageTo64F
+, unsafeImageTo8Bit
 
 -- * Low level access operations
 , BareImage(..)

--              {#call incrImageC#} -- Uncomment this line to get statistics of number of images allocated by ghc
              fptr <- newForeignPtr iptr (freeBareImage iptr)
              return . BareImage $ fptr

unImage (S (BareImage fptr)) = fptr


-- | Convert an image to from arbitrary bit depth into 64 bit, floating point, image.
--   This conversion does preserve the color space.
-- Note: this function is named unsafe because it will lose information
-- from the image.
unsafeImageTo64F :: Image c d -> Image c D64
unsafeImageTo64F img = unsafePerformIO $ withGenImage img $ \image ->
                creatingImage
