-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | Uses the DevIL C library to read and write images from
and to files and memory buffers.
--
@package friday-devil
@version 0.1.1.0
-- | Defines image types which can be used with the DevIL API.
module Vision.Image.Storage.DevIL.ImageType
class ImageType t
toIlType :: ImageType t => t -> Word32
-- | Tries to determine automatically the image type with the header and/or
-- the file extension.
--
-- Raises an UnknownFileType error if the detection failed.
data Autodetect
Autodetect :: Autodetect
data BLP
BLP :: BLP
data BMP
BMP :: BMP
data CHEAD
CHEAD :: CHEAD
data CUT
CUT :: CUT
data DCX
DCX :: DCX
-- | DirectDraw Surface (.dds).
data DDS
DDS :: DDS
data DICOM
DICOM :: DICOM
-- | Doom texture.
data Doom
Doom :: Doom
-- | Doom flat texture (floor).
data DoomFlat
DoomFlat :: DoomFlat
data DPX
DPX :: DPX
data EXR
EXR :: EXR
data FITS
FITS :: FITS
data FTX
FTX :: FTX
data GIF
GIF :: GIF
data HDR
HDR :: HDR
data ICO
ICO :: ICO
data ICNS
ICNS :: ICNS
data IFF
IFF :: IFF
data IWI
IWI :: IWI
-- | Paint Shop Pro (Jasc) palette.
data JASCPAL
JASCPAL :: JASCPAL
-- | JPEG 2000.
data JP2
JP2 :: JP2
data JPG
JPG :: JPG
-- | Homeworld (.lif).
data LIF
LIF :: LIF
data MDL
MDL :: MDL
data MNG
MNG :: MNG
data MP3
MP3 :: MP3
data PCD
PCD :: PCD
data PCX
PCX :: PCX
data PIC
PIC :: PIC
data PIX
PIX :: PIX
data PNG
PNG :: PNG
-- | Portable AnyMap (.pbm, .pgm or .ppm).
data PNM
PNM :: PNM
-- | Photoshop Document.
data PSD
PSD :: PSD
-- | Paint Shop Pro image.
data PSP
PSP :: PSP
data PXR
PXR :: PXR
-- | Raw data with a 13-byte header.
data RAW
RAW :: RAW
data ROT
ROT :: ROT
data SGI
SGI :: SGI
data SUN
SUN :: SUN
-- | Medieval II: Total War Texture (.texture) file.
data Texture
Texture :: Texture
data TGA
TGA :: TGA
data TIFF
TIFF :: TIFF
data TPL
TPL :: TPL
data UTX
UTX :: UTX
data VTF
VTF :: VTF
data WAL
WAL :: WAL
data WBMP
WBMP :: WBMP
data XPM
XPM :: XPM
instance Eq Autodetect
instance Show Autodetect
instance Eq BLP
instance Show BLP
instance Eq BMP
instance Show BMP
instance Eq CHEAD
instance Show CHEAD
instance Eq CUT
instance Show CUT
instance Eq DCX
instance Show DCX
instance Eq DDS
instance Show DDS
instance Eq DICOM
instance Show DICOM
instance Eq Doom
instance Show Doom
instance Eq DoomFlat
instance Show DoomFlat
instance Eq DPX
instance Show DPX
instance Eq EXR
instance Show EXR
instance Eq FITS
instance Show FITS
instance Eq FTX
instance Show FTX
instance Eq GIF
instance Show GIF
instance Eq HDR
instance Show HDR
instance Eq ICO
instance Show ICO
instance Eq ICNS
instance Show ICNS
instance Eq IFF
instance Show IFF
instance Eq IWI
instance Show IWI
instance Eq JASCPAL
instance Show JASCPAL
instance Eq JP2
instance Show JP2
instance Eq JPG
instance Show JPG
instance Eq LIF
instance Show LIF
instance Eq MDL
instance Show MDL
instance Eq MNG
instance Show MNG
instance Eq MP3
instance Show MP3
instance Eq PCD
instance Show PCD
instance Eq PCX
instance Show PCX
instance Eq PIC
instance Show PIC
instance Eq PIX
instance Show PIX
instance Eq PNG
instance Show PNG
instance Eq PNM
instance Show PNM
instance Eq PSD
instance Show PSD
instance Eq PSP
instance Show PSP
instance Eq PXR
instance Show PXR
instance Eq RAW
instance Show RAW
instance Eq ROT
instance Show ROT
instance Eq SGI
instance Show SGI
instance Eq SUN
instance Show SUN
instance Eq Texture
instance Show Texture
instance Eq TGA
instance Show TGA
instance Eq TIFF
instance Show TIFF
instance Eq TPL
instance Show TPL
instance Eq UTX
instance Show UTX
instance Eq VTF
instance Show VTF
instance Eq WAL
instance Show WAL
instance Eq WBMP
instance Show WBMP
instance Eq XPM
instance Show XPM
instance ImageType XPM
instance ImageType WBMP
instance ImageType WAL
instance ImageType VTF
instance ImageType UTX
instance ImageType TPL
instance ImageType TIFF
instance ImageType TGA
instance ImageType Texture
instance ImageType SUN
instance ImageType SGI
instance ImageType ROT
instance ImageType RAW
instance ImageType PXR
instance ImageType PSP
instance ImageType PSD
instance ImageType PNM
instance ImageType PNG
instance ImageType PIX
instance ImageType PIC
instance ImageType PCX
instance ImageType PCD
instance ImageType MP3
instance ImageType MNG
instance ImageType MDL
instance ImageType LIF
instance ImageType JPG
instance ImageType JP2
instance ImageType JASCPAL
instance ImageType IWI
instance ImageType IFF
instance ImageType ICNS
instance ImageType ICO
instance ImageType HDR
instance ImageType GIF
instance ImageType FTX
instance ImageType FITS
instance ImageType EXR
instance ImageType DPX
instance ImageType DoomFlat
instance ImageType Doom
instance ImageType DICOM
instance ImageType DDS
instance ImageType DCX
instance ImageType CUT
instance ImageType CHEAD
instance ImageType BMP
instance ImageType BLP
instance ImageType Autodetect
-- | Uses the DevIL C library to read and write images from and to files
-- and memory buffers.
--
-- Please read our README to to get a detailed usage and some
-- examples.
--
-- Note: As the underlying DevIL library is *not* tread-safe,
-- there is a global lock which will prevent two load/save calls to be
-- performed at the same time. The Haskell interface should be
-- thread-safe but will not be able to benefit from multiple processing
-- cores.
module Vision.Image.Storage.DevIL
data StorageImage
GreyStorage :: Grey -> StorageImage
RGBAStorage :: RGBA -> StorageImage
RGBStorage :: RGB -> StorageImage
data StorageError
-- | Failed to initialise the library.
FailedToInit :: StorageError
-- | Failed to open the given file.
FailedToOpenFile :: StorageError
-- | Failed to load the image, invalid format.
FailedToLoad :: StorageError
-- | Failed to convert the loaded image to its Haskell representation.
FailedToHaskell :: StorageError
-- | Failed to write the image content through the inner DevIL library.
FailedToDevil :: StorageError
-- | Failed to save the image.
FailedToSave :: StorageError
-- | The file already exists.
FileAlreadyExists :: StorageError
-- | The file could not be loaded because of an invalid value.
InvalidFile :: StorageError
-- | Could not allocate memory for the new image data.
OutOfMemory :: StorageError
-- | The file content or extension does not match any known image type.
UnknownFileType :: StorageError
UnknownError :: (Maybe String) -> StorageError
class ImageType t
-- | Image types which can be loaded using load and loadBS.
class ImageType t => LoadImageType t
-- | Image types which can be loaded using save.
class ImageType t => SaveImageType t
-- | Image types which can be loaded using saveBS.
class ImageType t => SaveBSImageType t
-- | Reads an image from a file.
--
-- If the Autodetect image type is given, type will be determined
-- automatically with the file extension and the file headers.
load :: (LoadImageType t, Convertible StorageImage i) => t -> FilePath -> IO (Either StorageError i)
-- | Reads an image from a strict ByteString.
--
-- If the Autodetect image type is given, type will be determined
-- automatically with the file headers.
loadBS :: (LoadImageType t, Convertible StorageImage i) => t -> ByteString -> Either StorageError i
-- | Saves the image to the given file.
--
-- If the Autodetect image type is given, type will be determined
-- automatically with the file extension.
--
-- Note: will fail if the file already exists.
save :: (SaveImageType t, Convertible i StorageImage) => t -> FilePath -> i -> IO (Maybe StorageError)
-- | Saves the image into a manifest vector from a strict
-- ByteString.
saveBS :: (SaveBSImageType t, Convertible i StorageImage) => t -> i -> Either StorageError ByteString
-- | Tries to determine automatically the image type with the header and/or
-- the file extension.
--
-- Raises an UnknownFileType error if the detection failed.
data Autodetect
Autodetect :: Autodetect
data BLP
BLP :: BLP
data BMP
BMP :: BMP
data CUT
CUT :: CUT
data DCX
DCX :: DCX
-- | DirectDraw Surface (.dds).
data DDS
DDS :: DDS
data DICOM
DICOM :: DICOM
-- | Doom texture.
data Doom
Doom :: Doom
-- | Doom flat texture (floor).
data DoomFlat
DoomFlat :: DoomFlat
data DPX
DPX :: DPX
data EXR
EXR :: EXR
data FITS
FITS :: FITS
data FTX
FTX :: FTX
data GIF
GIF :: GIF
data HDR
HDR :: HDR
data ICO
ICO :: ICO
data ICNS
ICNS :: ICNS
data IFF
IFF :: IFF
data IWI
IWI :: IWI
-- | Paint Shop Pro (Jasc) palette.
data JASCPAL
JASCPAL :: JASCPAL
-- | JPEG 2000.
data JP2
JP2 :: JP2
data JPG
JPG :: JPG
-- | Homeworld (.lif).
data LIF
LIF :: LIF
data MDL
MDL :: MDL
data MNG
MNG :: MNG
data MP3
MP3 :: MP3
data PCD
PCD :: PCD
data PCX
PCX :: PCX
data PIC
PIC :: PIC
data PIX
PIX :: PIX
data PNG
PNG :: PNG
-- | Portable AnyMap (.pbm, .pgm or .ppm).
data PNM
PNM :: PNM
-- | Photoshop Document.
data PSD
PSD :: PSD
-- | Paint Shop Pro image.
data PSP
PSP :: PSP
data PXR
PXR :: PXR
-- | Raw data with a 13-byte header.
data RAW
RAW :: RAW
data ROT
ROT :: ROT
data SGI
SGI :: SGI
data SUN
SUN :: SUN
-- | Medieval II: Total War Texture (.texture) file.
data Texture
Texture :: Texture
data TGA
TGA :: TGA
data TIFF
TIFF :: TIFF
data TPL
TPL :: TPL
data UTX
UTX :: UTX
data VTF
VTF :: VTF
data WAL
WAL :: WAL
data WBMP
WBMP :: WBMP
data XPM
XPM :: XPM
instance Show StorageImage
instance Eq StorageError
instance Show ImageName
instance SaveBSImageType XPM
instance SaveBSImageType WBMP
instance SaveBSImageType VTF
instance SaveBSImageType TIFF
instance SaveBSImageType TGA
instance SaveBSImageType SGI
instance SaveBSImageType RAW
instance SaveBSImageType PSD
instance SaveBSImageType PNM
instance SaveBSImageType PNG
instance SaveBSImageType JPG
instance SaveBSImageType JP2
instance SaveBSImageType JASCPAL
instance SaveBSImageType HDR
instance SaveBSImageType EXR
instance SaveBSImageType DDS
instance SaveBSImageType CHEAD
instance SaveBSImageType BMP
instance SaveImageType XPM
instance SaveImageType WBMP
instance SaveImageType VTF
instance SaveImageType TIFF
instance SaveImageType TGA
instance SaveImageType SGI
instance SaveImageType RAW
instance SaveImageType PSD
instance SaveImageType PNM
instance SaveImageType PNG
instance SaveImageType JPG
instance SaveImageType JP2
instance SaveImageType JASCPAL
instance SaveImageType HDR
instance SaveImageType EXR
instance SaveImageType DDS
instance SaveImageType CHEAD
instance SaveImageType BMP
instance SaveImageType Autodetect
instance LoadImageType XPM
instance LoadImageType WBMP
instance LoadImageType WAL
instance LoadImageType VTF
instance LoadImageType UTX
instance LoadImageType TPL
instance LoadImageType TIFF
instance LoadImageType TGA
instance LoadImageType Texture
instance LoadImageType SUN
instance LoadImageType SGI
instance LoadImageType ROT
instance LoadImageType RAW
instance LoadImageType PXR
instance LoadImageType PSP
instance LoadImageType PSD
instance LoadImageType PNM
instance LoadImageType PNG
instance LoadImageType PIX
instance LoadImageType PIC
instance LoadImageType PCX
instance LoadImageType PCD
instance LoadImageType MP3
instance LoadImageType MNG
instance LoadImageType MDL
instance LoadImageType LIF
instance LoadImageType JPG
instance LoadImageType JP2
instance LoadImageType JASCPAL
instance LoadImageType IWI
instance LoadImageType IFF
instance LoadImageType ICNS
instance LoadImageType ICO
instance LoadImageType HDR
instance LoadImageType GIF
instance LoadImageType FTX
instance LoadImageType FITS
instance LoadImageType EXR
instance LoadImageType DPX
instance LoadImageType DoomFlat
instance LoadImageType Doom
instance LoadImageType DICOM
instance LoadImageType DDS
instance LoadImageType DCX
instance LoadImageType CUT
instance LoadImageType BMP
instance LoadImageType BLP
instance LoadImageType Autodetect
instance Show StorageError
instance Error StorageError
instance NFData StorageImage
instance (Convertible Grey i, Convertible RGB i, Convertible RGBA i) => Convertible StorageImage i
instance Convertible RGB StorageImage
instance Convertible RGBA StorageImage
instance Convertible Grey StorageImage
instance Convertible StorageImage StorageImage