I think the Pixel class should have a pair of functions to convert to and from a DynamicImage:
class (Storable (PixelBaseComponent a), Num (PixelBaseComponent a), Eq a) => Pixel a where
...
toDynamicImage :: Image a -> DynamicImage
fromDynamicImage :: DynamicImage -> Maybe (Image a)
I think the
Pixel
class should have a pair of functions to convert to and from aDynamicImage
: