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 Source # | |
ImageFormat BMP Source # | |
Writable (Image VS YA Double) BMP Source # | |
Writable (Image VS Y Double) BMP Source # | |
Writable (Image VS Y Word8) BMP Source # | |
Writable (Image VS X Bit) BMP Source # | |
Writable (Image VS RGBA Double) BMP Source # | |
Writable (Image VS RGBA Word8) BMP Source # | |
Writable (Image VS RGB Double) BMP Source # | |
Writable (Image VS RGB Word8) BMP Source # | |
Readable (Image VS YA Double) BMP Source # | |
Readable (Image VS Y Double) BMP Source # | |
Readable (Image VS Y Word8) BMP Source # | |
Readable (Image VS X Bit) BMP Source # | |
Readable (Image VS RGBA Double) BMP Source # | |
Readable (Image VS RGBA Word8) BMP Source # | |
Readable (Image VS RGB Double) BMP Source # | |
Readable (Image VS RGB Word8) BMP Source # | |
data SaveOption BMP Source # | |
GIF
Graphics Interchange Format image with .gif
extension.
Constructors
GIF |
Instances
Instances
Show GIFA Source # | |
ImageFormat GIFA Source # | |
Writable [(GifDelay, Image VS RGB Double)] GIFA Source # | |
Writable [(GifDelay, Image VS RGB Word8)] GIFA Source # | |
Readable [(GifDelay, Image VS RGBA Word8)] GIFA Source # | |
Readable [(GifDelay, Image VS RGB Word8)] GIFA Source # | |
Readable [Image VS YA Double] GIFA Source # | |
Readable [Image VS Y Double] GIFA Source # | |
Readable [Image VS RGBA Double] GIFA Source # | |
Readable [Image VS RGBA Word8] GIFA Source # | |
Readable [Image VS RGB Double] GIFA Source # | |
Readable [Image VS RGB Word8] GIFA Source # | |
data SaveOption GIFA Source # | |
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 Source # | |
ImageFormat HDR Source # | |
Writable (Image VS YA Double) HDR Source # | |
Writable (Image VS Y Double) HDR Source # | |
Writable (Image VS RGBA Double) HDR Source # | |
Writable (Image VS RGB Double) HDR Source # | |
Writable (Image VS RGB Float) HDR Source # | |
Readable (Image VS YA Double) HDR Source # | |
Readable (Image VS Y Double) HDR Source # | |
Readable (Image VS RGBA Double) HDR Source # | |
Readable (Image VS RGB Double) HDR Source # | |
Readable (Image VS RGB Float) HDR Source # | |
data SaveOption HDR Source # | |
JPG
Joint Photographic Experts Group image with .jpg
or .jpeg
extension.
Constructors
JPG |
Instances
PNG
Portable Network Graphics image with .png
extension.
Constructors
PNG |
Instances
TGA
Truevision Graphics Adapter image with .tga extension.
Constructors
TGA |
Instances
ImageFormat TGA Source # | |
Writable (Image VS YA Double) TGA Source # | |
Writable (Image VS Y Double) TGA Source # | |
Writable (Image VS Y Word8) TGA Source # | |
Writable (Image VS X Bit) TGA Source # | |
Writable (Image VS RGBA Double) TGA Source # | |
Writable (Image VS RGBA Word8) TGA Source # | |
Writable (Image VS RGB Double) TGA Source # | |
Writable (Image VS RGB Word8) TGA Source # | |
Readable (Image VS YA Double) TGA Source # | |
Readable (Image VS Y Double) TGA Source # | |
Readable (Image VS Y Word8) TGA Source # | |
Readable (Image VS X Bit) TGA Source # | |
Readable (Image VS RGBA Double) TGA Source # | |
Readable (Image VS RGBA Word8) TGA Source # | |
Readable (Image VS RGB Double) TGA Source # | |
Readable (Image VS RGB Word8) TGA Source # | |
data SaveOption TGA Source # | |
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 Source #
toJPImageRGB16 :: Image VS RGB Word16 -> Image PixelRGB16 Source #
toJPImageRGBA16 :: Image VS RGBA Word16 -> Image PixelRGBA16 Source #
toJPImageYCbCr8 :: Image VS YCbCr Word8 -> Image PixelYCbCr8 Source #
toJPImageCMYK8 :: Image VS CMYK Word8 -> Image PixelCMYK8 Source #
toJPImageCMYK16 :: Image VS CMYK Word16 -> Image PixelCMYK16 Source #
From JuicyPixels
fromJPImageRGBA8 :: Image PixelRGBA8 -> Image VS RGBA Word8 Source #
fromJPImageRGB16 :: Image PixelRGB16 -> Image VS RGB Word16 Source #
fromJPImageCMYK8 :: Image PixelCMYK8 -> Image VS CMYK Word8 Source #
Netpbm formats
PBM
Netpbm: portable bitmap image with .pbm
extension.
Constructors
PBM |
PGM
Netpbm: portable graymap image with .pgm
extension.
Constructors
PGM |
Instances
Show PGM Source # | |
ImageFormat PGM Source # | |
ImageFormat (Seq PGM) Source # | |
Readable [Image VS Y Word8] (Seq PGM) Source # | |
Readable [Image VS Y Word16] (Seq PGM) Source # | |
Readable (Image VS Y Double) PGM Source # | |
Readable (Image VS Y Word8) PGM Source # | |
Readable (Image VS Y Word16) PGM Source # | |
data SaveOption PGM Source # | |
data SaveOption (Seq PGM) Source # | |
PPM
Netpbm: portable pixmap image with .ppm
extension.
Constructors
PPM |
Instances
Show PPM Source # | |
ImageFormat PPM Source # | |
ImageFormat (Seq PPM) Source # | |
Readable [Image VS RGB Word8] (Seq PPM) Source # | |
Readable [Image VS RGB Word16] (Seq PPM) Source # | |
Readable (Image VS YA Double) PPM Source # | |
Readable (Image VS Y Double) PPM Source # | |
Readable (Image VS RGBA Double) PPM Source # | |
Readable (Image VS RGB Double) PPM Source # | |
Readable (Image VS RGB Word8) PPM Source # | |
Readable (Image VS RGB Word16) PPM Source # | |
data SaveOption PPM Source # | |
data SaveOption (Seq PPM) Source # | |
General
class ImageFormat format where Source #
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 Source #
Options that can be used during writing an image in this format.
Methods
ext :: format -> String Source #
Default file extension for this image format.
exts :: format -> [String] Source #
Known file extensions for this image format, if more than one is commonly used, eg. ".jpeg", ".jpg".
isFormat :: String -> format -> Bool Source #
Checks if a file extension
corresponds to the format, eg. isFormat ".png" PNG == True
Instances
data InputFormat Source #
A collection of all image formats that can be read into HIP images.
Instances
Bounded InputFormat Source # | |
Enum InputFormat Source # | |
Eq InputFormat Source # | |
Show InputFormat Source # | |
ImageFormat InputFormat Source # | |
AllReadable arr cs => Readable (Image arr cs Double) InputFormat Source # | |
data SaveOption InputFormat Source # | |
data OutputFormat Source #
A collection of all image formats that can be written to file using images with
Double
precision pixels.
Instances
Bounded OutputFormat Source # | |
Enum OutputFormat Source # | |
Eq OutputFormat Source # | |
Show OutputFormat Source # | |
ImageFormat OutputFormat Source # | |
AllWritable arr cs => Writable (Image arr cs Double) OutputFormat Source # | |
data SaveOption OutputFormat Source # | |
class ImageFormat format => Readable img format where Source #
Image formats that can be read from file.
Minimal complete definition
Instances
class ImageFormat format => Writable img format where Source #
Image formats that can be written to file.
Minimal complete definition
Methods
encode :: format -> [SaveOption format] -> img -> ByteString Source #
Encode an image into ByteString
.
Instances
class Convertible cs e where Source #
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 Source #
Instances
Special wrapper for formats that support encoding/decoding sequence of images.
Constructors
Seq f |
Instances
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) Source #
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) Source #
Constraint type synonym for all writable formats.