picedit-0.1.1.0: simple image manipulation functions

Copyright(c) Mahdi Dibaiee 2016
LicenseGPL-3
Maintainermdibaiee@aol.com
Stabilityexperimental
PortabilityPOSIX
Safe HaskellNone
LanguageHaskell2010

Data.Picture

Contents

Description

 

Synopsis

Documentation

type Picture = (Matrix Double, Matrix Double, Matrix Double) Source #

(R, G, B) color channels

Manipulation functions

grayscale :: Picture -> Picture Source #

Turn the Picture grayscale

fade :: Double -> Picture -> Picture Source #

Fade the Picture by a number between 0 and 1

rotate :: Double -> Maybe (Int, Int) -> Picture -> Picture Source #

Rotate Picture for the specified degrees, around the specified origin. If the origin is Nothing, rotates around the center

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

gamma :: Int -> Picture -> Picture Source #

Set gamma level of Picture

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

Converting between Image and Picture

fromImage :: Image PixelRGB8 -> Picture Source #

Converts a JuicyPixel 'Image PixelRGB8' to Picture

toImage :: Picture -> Image PixelRGB8 Source #

Converts a Picture to JuicyPixel 'Image PixelRGB8'

IO operations

readPicture :: FilePath -> IO (Either String Picture) Source #

Reads a Picture from specified path

writePicturePng :: FilePath -> Picture -> IO () Source #

Write the specified Picture to a PNG file