| Copyright | (c) Mahdi Dibaiee 2016 | 
|---|---|
| License | GPL-3 | 
| Maintainer | mdibaiee@aol.com | 
| Stability | experimental | 
| Portability | POSIX | 
| Safe Haskell | None | 
| Language | Haskell2010 | 
Data.Picture
Description
- type Picture = (Matrix Double, Matrix Double, Matrix Double, Matrix Double)
 - grayscale :: Picture -> Picture
 - fade :: Double -> Picture -> Picture
 - rotate :: Double -> Maybe (Int, Int) -> Picture -> Picture
 - contrast :: Double -> Picture -> Picture
 - brightness :: Double -> Picture -> Picture
 - gamma :: Int -> Picture -> Picture
 - invert :: Picture -> Picture
 - compress :: Int -> Picture -> Picture
 - embed :: Picture -> (Int, Int) -> Picture -> Picture
 - resize :: (Int, Int) -> Picture -> Picture
 - scale :: Double -> Picture -> Picture
 - fromImage :: Image PixelRGBA8 -> Picture
 - toImage :: Picture -> Image PixelRGBA8
 - readPicture :: FilePath -> IO (Either String Picture)
 - writePicturePng :: FilePath -> Picture -> IO ()
 
Documentation
type Picture = (Matrix Double, Matrix Double, Matrix Double, Matrix Double) Source #
(R, G, B, A) color channels
Manipulation functions
contrast :: Double -> Picture -> Picture Source #
Set contrast level of Picture, a number between -255 and 255
brightness :: Double -> Picture -> Picture Source #
Set brightness level of Picture, a number between -255 and 255
compress :: Int -> Picture -> Picture Source #
Compress the image using SVD note: this is not size compression, it's just a k-rank approximation of the image
embed :: Picture -> (Int, Int) -> Picture -> Picture Source #
Embed a Picture into another one, in the specified position-}
resize :: (Int, Int) -> Picture -> Picture Source #
Resize an image using nearest-neighbor interpolation
Converting between Image and Picture
fromImage :: Image PixelRGBA8 -> Picture Source #
Converts a JuicyPixel 'Image PixelRGBA8' to Picture