Copyright | (c) Alexey Kuleshevich 2017 |
---|---|
License | BSD3 |
Maintainer | Alexey Kuleshevich <lehins@yandex.ru> |
Stability | experimental |
Portability | non-portable |
Safe Haskell | None |
Language | Haskell2010 |
Synopsis
- data family SaveOption format
- 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 InputFormat
- data OutputFormat
- class ImageFormat format => Readable img format where
- decode :: format -> ByteString -> Either String img
- class ImageFormat format => Writable img format where
- encode :: format -> [SaveOption format] -> img -> ByteString
- 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
data family SaveOption format Source #
Options that can be used during writing an image in this format.
Instances
BMP
Bitmap image with .bmp
extension.
Instances
GIF
Graphics Interchange Format image with .gif
extension.
Instances
Instances
Show GIFA Source # | |
ImageFormat GIFA Source # | |
Writable [(GifDelay, Image VS RGB Double)] GIFA Source # | |
Defined in Graphics.Image.IO.Formats.JuicyPixels | |
Writable [(GifDelay, Image VS RGB Word8)] GIFA Source # | |
Defined in Graphics.Image.IO.Formats.JuicyPixels | |
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 # | |
Defined in Graphics.Image.IO.Formats.JuicyPixels |
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.
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.
PaletteOptions | |
|
data PaletteCreationMethod #
Define which palette creation method is used.
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.
Instances
Show HDR Source # | |
ImageFormat HDR Source # | |
Writable (Image VS YA Double) HDR Source # | |
Defined in Graphics.Image.IO.Formats.JuicyPixels | |
Writable (Image VS Y Double) HDR Source # | |
Defined in Graphics.Image.IO.Formats.JuicyPixels | |
Writable (Image VS RGBA Double) HDR Source # | |
Defined in Graphics.Image.IO.Formats.JuicyPixels | |
Writable (Image VS RGB Double) HDR Source # | |
Defined in Graphics.Image.IO.Formats.JuicyPixels | |
Writable (Image VS RGB Float) HDR Source # | |
Defined in Graphics.Image.IO.Formats.JuicyPixels | |
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 # | |
Defined in Graphics.Image.IO.Formats.JuicyPixels |
JPG
Joint Photographic Experts Group image with .jpg
or .jpeg
extension.
Instances
PNG
Portable Network Graphics image with .png
extension.
Instances
TGA
Truevision Graphics Adapter image with .tga extension.
Instances
TIF
Tagged Image File Format image with .tif
or .tiff
extension.
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.
Instances
Show PBM Source # | |
ImageFormat PBM Source # | |
ImageFormat (Seq PBM) Source # | |
Readable [Image VS X Bit] (Seq PBM) Source # | |
Readable (Image VS Y Double) PBM Source # | |
Readable (Image VS X Bit) PBM Source # | |
data SaveOption PBM Source # | |
Defined in Graphics.Image.IO.Formats.Netpbm | |
data SaveOption (Seq PBM) Source # | |
Defined in Graphics.Image.IO.Formats.Netpbm |
PGM
Netpbm: portable graymap image with .pgm
extension.
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 # | |
Defined in Graphics.Image.IO.Formats.Netpbm | |
data SaveOption (Seq PGM) Source # | |
Defined in Graphics.Image.IO.Formats.Netpbm |
PPM
Netpbm: portable pixmap image with .ppm
extension.
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 # | |
Defined in Graphics.Image.IO.Formats.Netpbm | |
data SaveOption (Seq PPM) Source # | |
Defined in Graphics.Image.IO.Formats.Netpbm |
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.
data SaveOption format Source #
Options that can be used during writing an image in this format.
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
ImageFormat PPM Source # | |
ImageFormat PGM Source # | |
ImageFormat PBM Source # | |
ImageFormat TIF Source # | |
ImageFormat TGA Source # | |
ImageFormat PNG Source # | |
ImageFormat JPG Source # | |
ImageFormat HDR Source # | |
ImageFormat GIFA Source # | |
ImageFormat GIF Source # | |
ImageFormat BMP Source # | |
ImageFormat OutputFormat Source # | |
Defined in Graphics.Image.IO.Formats data SaveOption OutputFormat :: Type Source # | |
ImageFormat InputFormat Source # | |
Defined in Graphics.Image.IO.Formats data SaveOption InputFormat :: Type Source # | |
ImageFormat (Seq PPM) Source # | |
ImageFormat (Seq PGM) Source # | |
ImageFormat (Seq PBM) Source # | |
ImageFormat (Seq GIF) Source # | |
data InputFormat Source #
A collection of all image formats that can be read into HIP images.
Instances
data OutputFormat Source #
A collection of all image formats that can be written to file using images with
Double
precision pixels.
Instances
class ImageFormat format => Readable img format where Source #
Image formats that can be read from file.
decode :: format -> ByteString -> Either String img Source #
Decode an image from ByteString
.
Instances
class ImageFormat format => Writable img format where Source #
Image formats that can be written to file.
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.
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
Convertible YA Double Source # | |
Convertible Y Double Source # | |
Convertible RGBA Double Source # | |
Convertible RGB Double Source # | |
Special wrapper for formats that support encoding/decoding sequence of images.
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.