Copyright | (c) Alexey Kuleshevich 2017 |
---|---|
License | BSD3 |
Maintainer | Alexey Kuleshevich <lehins@yandex.ru> |
Stability | experimental |
Portability | non-portable |
Safe Haskell | None |
Language | Haskell2010 |
Graphics.Image.IO.Formats
Contents
Description
- data BMP = BMP
- data GIF = GIF
- data GIFA = GIFA
- type GifDelay = Int
- data GifLooping :: *
- data PaletteOptions :: * = PaletteOptions {}
- data PaletteCreationMethod :: *
- data HDR = HDR
- data JPG = JPG
- data PNG = PNG
- data TGA = TGA
- data TIF = TIF
- toJPImageY8 :: Image VS Y Word8 -> Image Pixel8
- toJPImageYA8 :: Image VS YA Word8 -> Image PixelYA8
- toJPImageY16 :: Image VS Y Word16 -> Image Pixel16
- toJPImageYA16 :: Image VS YA Word16 -> Image PixelYA16
- toJPImageYF :: Image VS Y Float -> Image PixelF
- toJPImageRGB8 :: Image VS RGB Word8 -> Image PixelRGB8
- toJPImageRGBA8 :: Image VS RGBA Word8 -> Image PixelRGBA8
- toJPImageRGB16 :: Image VS RGB Word16 -> Image PixelRGB16
- toJPImageRGBA16 :: Image VS RGBA Word16 -> Image PixelRGBA16
- toJPImageRGBF :: Image VS RGB Float -> Image PixelRGBF
- toJPImageYCbCr8 :: Image VS YCbCr Word8 -> Image PixelYCbCr8
- toJPImageCMYK8 :: Image VS CMYK Word8 -> Image PixelCMYK8
- toJPImageCMYK16 :: Image VS CMYK Word16 -> Image PixelCMYK16
- fromJPImageY8 :: Image Pixel8 -> Image VS Y Word8
- fromJPImageYA8 :: Image PixelYA8 -> Image VS YA Word8
- fromJPImageY16 :: Image Pixel16 -> Image VS Y Word16
- fromJPImageYA16 :: Image PixelYA16 -> Image VS YA Word16
- fromJPImageYF :: Image PixelF -> Image VS Y Float
- fromJPImageRGB8 :: Image PixelRGB8 -> Image VS RGB Word8
- fromJPImageRGBA8 :: Image PixelRGBA8 -> Image VS RGBA Word8
- fromJPImageRGB16 :: Image PixelRGB16 -> Image VS RGB Word16
- fromJPImageRGBA16 :: Image PixelRGBA16 -> Image VS RGBA Word16
- fromJPImageRGBF :: Image PixelRGBF -> Image VS RGB Float
- fromJPImageYCbCr8 :: Image PixelYCbCr8 -> Image VS YCbCr Word8
- fromJPImageCMYK8 :: Image PixelCMYK8 -> Image VS CMYK Word8
- fromJPImageCMYK16 :: Image PixelCMYK16 -> Image VS CMYK Word16
- data PBM = PBM
- data PGM = PGM
- data PPM = PPM
- class ImageFormat format where
- data SaveOption format
- data InputFormat
- data OutputFormat
- class ImageFormat format => Readable img format where
- class ImageFormat format => Writable img format where
- class Convertible cs e where
- newtype Seq f = Seq f
- type AllReadable arr cs = (Readable (Image arr cs Double) BMP, Readable (Image arr cs Double) GIF, Readable (Image arr cs Double) HDR, Readable (Image arr cs Double) JPG, Readable (Image arr cs Double) PNG, Readable (Image arr cs Double) TGA, Readable (Image arr cs Double) TIF, Readable (Image arr cs Double) PPM)
- type AllWritable arr cs = (Writable (Image arr cs Double) BMP, Writable (Image arr cs Double) GIF, Writable (Image arr cs Double) HDR, Writable (Image arr cs Double) JPG, Writable (Image arr cs Double) PNG, Writable (Image arr cs Double) TGA, Writable (Image arr cs Double) TIF)
- type ComplexWritable format arr cs e = (Array arr cs e, Array arr cs (Complex e), RealFloat e, Applicative (Pixel cs), Writable (Image arr cs e) format)
JuicyPixels formats
BMP
Bitmap image with .bmp
extension.
Constructors
BMP |
Instances
Show BMP # | |
ImageFormat BMP # | |
Writable (Image VS YA Double) BMP # | |
Writable (Image VS Y Double) BMP # | |
Writable (Image VS Y Word8) BMP # | |
Writable (Image VS X Bit) BMP # | |
Writable (Image VS RGBA Double) BMP # | |
Writable (Image VS RGBA Word8) BMP # | |
Writable (Image VS RGB Double) BMP # | |
Writable (Image VS RGB Word8) BMP # | |
Readable (Image VS YA Double) BMP # | |
Readable (Image VS Y Double) BMP # | |
Readable (Image VS Y Word8) BMP # | |
Readable (Image VS X Bit) BMP # | |
Readable (Image VS RGBA Double) BMP # | |
Readable (Image VS RGBA Word8) BMP # | |
Readable (Image VS RGB Double) BMP # | |
Readable (Image VS RGB Word8) BMP # | |
data SaveOption BMP # | |
GIF
Graphics Interchange Format image with .gif
extension.
Constructors
GIF |
Instances
Show GIF # | |
ImageFormat GIF # | |
ImageFormat (Seq GIF) # | |
Writable [(GifDelay, Image VS RGB Double)] (Seq GIF) # | |
Writable [(GifDelay, Image VS RGB Word8)] (Seq GIF) # | |
Readable [(GifDelay, Image VS RGBA Word8)] (Seq GIF) # | |
Readable [(GifDelay, Image VS RGB Word8)] (Seq GIF) # | |
Readable [Image VS YA Double] (Seq GIF) # | |
Readable [Image VS Y Double] (Seq GIF) # | |
Readable [Image VS RGBA Double] (Seq GIF) # | |
Readable [Image VS RGBA Word8] (Seq GIF) # | |
Readable [Image VS RGB Double] (Seq GIF) # | |
Readable [Image VS RGB Word8] (Seq GIF) # | |
Writable (Image VS YA Double) GIF # | |
Writable (Image VS Y Double) GIF # | |
Writable (Image VS RGBA Double) GIF # | |
Writable (Image VS RGB Double) GIF # | |
Writable (Image VS RGB Word8) GIF # | |
Readable (Image VS YA Double) GIF # | |
Readable (Image VS Y Double) GIF # | |
Readable (Image VS RGBA Double) GIF # | |
Readable (Image VS RGBA Word8) GIF # | |
Readable (Image VS RGB Double) GIF # | |
Readable (Image VS RGB Word8) GIF # | |
data SaveOption GIF # | |
data SaveOption (Seq GIF) # | |
Instances
Show GIFA # | |
ImageFormat GIFA # | |
Writable [(GifDelay, Image VS RGB Double)] GIFA # | |
Writable [(GifDelay, Image VS RGB Word8)] GIFA # | |
Readable [(GifDelay, Image VS RGBA Word8)] GIFA # | |
Readable [(GifDelay, Image VS RGB Word8)] GIFA # | |
Readable [Image VS YA Double] GIFA # | |
Readable [Image VS Y Double] GIFA # | |
Readable [Image VS RGBA Double] GIFA # | |
Readable [Image VS RGBA Word8] GIFA # | |
Readable [Image VS RGB Double] GIFA # | |
Readable [Image VS RGB Word8] GIFA # | |
data SaveOption GIFA # | |
Delay to wait before showing the next Gif image. The delay is expressed in 100th of seconds.
data GifLooping :: * #
Help to control the behaviour of GIF animation looping.
Constructors
LoopingNever | The animation will stop once the end is reached |
LoopingForever | The animation will restart once the end is reached |
LoopingRepeat Word16 | The animation will repeat n times before stoping |
data PaletteOptions :: * #
To specify how the palette will be created.
Constructors
PaletteOptions | |
Fields
|
data PaletteCreationMethod :: * #
Define which palette creation method is used.
Constructors
MedianMeanCut | MedianMeanCut method, provide the best results (visualy) at the cost of increased calculations. |
Uniform | Very fast algorithm (one pass), doesn't provide good looking results. |
HDR
High-dynamic-range image with .hdr
or .pic
extension.
Constructors
HDR |
Instances
Show HDR # | |
ImageFormat HDR # | |
Writable (Image VS YA Double) HDR # | |
Writable (Image VS Y Double) HDR # | |
Writable (Image VS RGBA Double) HDR # | |
Writable (Image VS RGB Double) HDR # | |
Writable (Image VS RGB Float) HDR # | |
Readable (Image VS YA Double) HDR # | |
Readable (Image VS Y Double) HDR # | |
Readable (Image VS RGBA Double) HDR # | |
Readable (Image VS RGB Double) HDR # | |
Readable (Image VS RGB Float) HDR # | |
data SaveOption HDR # | |
JPG
Joint Photographic Experts Group image with .jpg
or .jpeg
extension.
Constructors
JPG |
Instances
Show JPG # | |
ImageFormat JPG # | |
Writable (Image VS YCbCr Word8) JPG # | |
Writable (Image VS YA Double) JPG # | Image is converted |
Writable (Image VS Y Double) JPG # | Image is converted |
Writable (Image VS Y Word8) JPG # | |
Writable (Image VS RGBA Double) JPG # | Image is converted |
Writable (Image VS RGB Double) JPG # | Image is converted |
Writable (Image VS RGB Word8) JPG # | |
Writable (Image VS CMYK Word8) JPG # | |
Readable (Image VS YCbCr Word8) JPG # | |
Readable (Image VS YA Double) JPG # | |
Readable (Image VS YA Word8) JPG # | |
Readable (Image VS Y Double) JPG # | |
Readable (Image VS Y Word8) JPG # | |
Readable (Image VS RGBA Double) JPG # | |
Readable (Image VS RGB Double) JPG # | |
Readable (Image VS RGB Word8) JPG # | |
Readable (Image VS CMYK Word8) JPG # | |
data SaveOption JPG # | |
PNG
Portable Network Graphics image with .png
extension.
Constructors
PNG |
Instances
Show PNG # | |
ImageFormat PNG # | |
Writable (Image VS YA Double) PNG # | |
Writable (Image VS YA Word8) PNG # | |
Writable (Image VS YA Word16) PNG # | |
Writable (Image VS Y Double) PNG # | |
Writable (Image VS Y Word8) PNG # | |
Writable (Image VS Y Word16) PNG # | |
Writable (Image VS X Bit) PNG # | |
Writable (Image VS RGBA Double) PNG # | |
Writable (Image VS RGBA Word8) PNG # | |
Writable (Image VS RGBA Word16) PNG # | |
Writable (Image VS RGB Double) PNG # | |
Writable (Image VS RGB Word8) PNG # | |
Writable (Image VS RGB Word16) PNG # | |
Readable (Image VS YA Double) PNG # | |
Readable (Image VS YA Word8) PNG # | |
Readable (Image VS YA Word16) PNG # | |
Readable (Image VS Y Double) PNG # | |
Readable (Image VS Y Word8) PNG # | |
Readable (Image VS Y Word16) PNG # | |
Readable (Image VS X Bit) PNG # | |
Readable (Image VS RGBA Double) PNG # | |
Readable (Image VS RGBA Word8) PNG # | |
Readable (Image VS RGBA Word16) PNG # | |
Readable (Image VS RGB Double) PNG # | |
Readable (Image VS RGB Word8) PNG # | |
Readable (Image VS RGB Word16) PNG # | |
data SaveOption PNG # | |
TGA
Truevision Graphics Adapter image with .tga extension.
Constructors
TGA |
Instances
ImageFormat TGA # | |
Writable (Image VS YA Double) TGA # | |
Writable (Image VS Y Double) TGA # | |
Writable (Image VS Y Word8) TGA # | |
Writable (Image VS X Bit) TGA # | |
Writable (Image VS RGBA Double) TGA # | |
Writable (Image VS RGBA Word8) TGA # | |
Writable (Image VS RGB Double) TGA # | |
Writable (Image VS RGB Word8) TGA # | |
Readable (Image VS YA Double) TGA # | |
Readable (Image VS Y Double) TGA # | |
Readable (Image VS Y Word8) TGA # | |
Readable (Image VS X Bit) TGA # | |
Readable (Image VS RGBA Double) TGA # | |
Readable (Image VS RGBA Word8) TGA # | |
Readable (Image VS RGB Double) TGA # | |
Readable (Image VS RGB Word8) TGA # | |
data SaveOption TGA # | |
TIF
Tagged Image File Format image with .tif
or .tiff
extension.
Constructors
TIF |
Instances
JuciyPixels conversion
To JuicyPixels
toJPImageRGBA8 :: Image VS RGBA Word8 -> Image PixelRGBA8 #
toJPImageRGB16 :: Image VS RGB Word16 -> Image PixelRGB16 #
toJPImageRGBA16 :: Image VS RGBA Word16 -> Image PixelRGBA16 #
toJPImageYCbCr8 :: Image VS YCbCr Word8 -> Image PixelYCbCr8 #
toJPImageCMYK8 :: Image VS CMYK Word8 -> Image PixelCMYK8 #
toJPImageCMYK16 :: Image VS CMYK Word16 -> Image PixelCMYK16 #
From JuicyPixels
fromJPImageRGBA8 :: Image PixelRGBA8 -> Image VS RGBA Word8 #
fromJPImageRGB16 :: Image PixelRGB16 -> Image VS RGB Word16 #
fromJPImageRGBA16 :: Image PixelRGBA16 -> Image VS RGBA Word16 #
fromJPImageYCbCr8 :: Image PixelYCbCr8 -> Image VS YCbCr Word8 #
fromJPImageCMYK8 :: Image PixelCMYK8 -> Image VS CMYK Word8 #
fromJPImageCMYK16 :: Image PixelCMYK16 -> Image VS CMYK Word16 #
Netpbm formats
PBM
Netpbm: portable bitmap image with .pbm
extension.
Constructors
PBM |
PGM
Netpbm: portable graymap image with .pgm
extension.
Constructors
PGM |
PPM
Netpbm: portable pixmap image with .ppm
extension.
Constructors
PPM |
Instances
Show PPM # | |
ImageFormat PPM # | |
ImageFormat (Seq PPM) # | |
Readable [Image VS RGB Word8] (Seq PPM) # | |
Readable [Image VS RGB Word16] (Seq PPM) # | |
Readable (Image VS YA Double) PPM # | |
Readable (Image VS Y Double) PPM # | |
Readable (Image VS RGBA Double) PPM # | |
Readable (Image VS RGB Double) PPM # | |
Readable (Image VS RGB Word8) PPM # | |
Readable (Image VS RGB Word16) PPM # | |
data SaveOption PPM # | |
data SaveOption (Seq PPM) # | |
General
class ImageFormat format where #
Image file format. Helps in guessing image format using a file extension, as well as supplying format specific options during saving an image.
Minimal complete definition
Associated Types
data SaveOption format #
Options that can be used during writing an image in this format.
Methods
Default file extension for this image format.
Known file extensions for this image format, if more than one is commonly used, eg. ".jpeg", ".jpg".
isFormat :: String -> format -> Bool #
Checks if a file extension
corresponds to the format, eg. isFormat ".png" PNG == True
Instances
data InputFormat #
A collection of all image formats that can be read into HIP images.
Instances
Bounded InputFormat # | |
Enum InputFormat # | |
Eq InputFormat # | |
Show InputFormat # | |
ImageFormat InputFormat # | |
AllReadable arr cs => Readable (Image arr cs Double) InputFormat # | |
data SaveOption InputFormat # | |
data OutputFormat #
A collection of all image formats that can be written to file using images with
Double
precision pixels.
Instances
Bounded OutputFormat # | |
Enum OutputFormat # | |
Eq OutputFormat # | |
Show OutputFormat # | |
ImageFormat OutputFormat # | |
AllWritable arr cs => Writable (Image arr cs Double) OutputFormat # | |
data SaveOption OutputFormat # | |
class ImageFormat format => Readable img format where #
Image formats that can be read from file.
Minimal complete definition
Instances
class ImageFormat format => Writable img format where #
Image formats that can be written to file.
Minimal complete definition
Methods
encode :: format -> [SaveOption format] -> img -> ByteString #
Encode an image into ByteString
.
Instances
class Convertible cs e where #
Used during converting pixels between libraries.
Minimal complete definition
Methods
convert :: (ToYA cs' e', ToRGBA cs' e', Array arr cs' e', Array arr cs e) => Image arr cs' e' -> Image arr cs e #
Instances
Special wrapper for formats that support encoding/decoding sequence of images.
Constructors
Seq f |
Instances
ImageFormat (Seq GIF) # | |
ImageFormat (Seq PPM) # | |
ImageFormat (Seq PGM) # | |
ImageFormat (Seq PBM) # | |
Writable [(GifDelay, Image VS RGB Double)] (Seq GIF) # | |
Writable [(GifDelay, Image VS RGB Word8)] (Seq GIF) # | |
Readable [(GifDelay, Image VS RGBA Word8)] (Seq GIF) # | |
Readable [(GifDelay, Image VS RGB Word8)] (Seq GIF) # | |
Readable [Image VS YA Double] (Seq GIF) # | |
Readable [Image VS Y Double] (Seq GIF) # | |
Readable [Image VS Y Word8] (Seq PGM) # | |
Readable [Image VS Y Word16] (Seq PGM) # | |
Readable [Image VS X Bit] (Seq PBM) # | |
Readable [Image VS RGBA Double] (Seq GIF) # | |
Readable [Image VS RGBA Word8] (Seq GIF) # | |
Readable [Image VS RGB Double] (Seq GIF) # | |
Readable [Image VS RGB Word8] (Seq GIF) # | |
Readable [Image VS RGB Word8] (Seq PPM) # | |
Readable [Image VS RGB Word16] (Seq PPM) # | |
data SaveOption (Seq GIF) # | |
data SaveOption (Seq PPM) # | |
data SaveOption (Seq PGM) # | |
data SaveOption (Seq PBM) # | |
type AllReadable arr cs = (Readable (Image arr cs Double) BMP, Readable (Image arr cs Double) GIF, Readable (Image arr cs Double) HDR, Readable (Image arr cs Double) JPG, Readable (Image arr cs Double) PNG, Readable (Image arr cs Double) TGA, Readable (Image arr cs Double) TIF, Readable (Image arr cs Double) PPM) #
Constraint type synonym for all readable formats.
type AllWritable arr cs = (Writable (Image arr cs Double) BMP, Writable (Image arr cs Double) GIF, Writable (Image arr cs Double) HDR, Writable (Image arr cs Double) JPG, Writable (Image arr cs Double) PNG, Writable (Image arr cs Double) TGA, Writable (Image arr cs Double) TIF) #
Constraint type synonym for all writable formats.
type ComplexWritable format arr cs e = (Array arr cs e, Array arr cs (Complex e), RealFloat e, Applicative (Pixel cs), Writable (Image arr cs e) format) #
Constraint type synonym for encoding a Complex image.