| Copyright | © 2016–present Mark Karpov |
|---|---|
| License | BSD 3 clause |
| Maintainer | Mark Karpov <markkarpov92@gmail.com> |
| Stability | experimental |
| Portability | portable |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
Codec.Picture.Extra
Description
A collection of functions to scale, crop, flip images with JuicyPixels.
Synopsis
- scaleBilinear :: (Pixel a, Bounded (PixelBaseComponent a), Integral (PixelBaseComponent a)) => Int -> Int -> Image a -> Image a
- crop :: Pixel a => Int -> Int -> Int -> Int -> Image a -> Image a
- trim :: (Pixel a, Eq (PixelBaseComponent a)) => Image a -> Image a
- flipHorizontally :: Pixel a => Image a -> Image a
- flipVertically :: Pixel a => Image a -> Image a
- rotateLeft90 :: Pixel a => Image a -> Image a
- rotateRight90 :: Pixel a => Image a -> Image a
- rotate180 :: Pixel a => Image a -> Image a
- beside :: Pixel a => [Image a] -> Image a
- below :: Pixel a => [Image a] -> Image a
- square :: Pixel a => a -> Image a -> Image a
Scaling
Arguments
| :: (Pixel a, Bounded (PixelBaseComponent a), Integral (PixelBaseComponent a)) | |
| => Int | Desired width |
| -> Int | Desired height |
| -> Image a | Original image |
| -> Image a | Scaled image |
Scale an image using bi-linear interpolation.
Cropping
Arguments
| :: Pixel a | |
| => Int | Index (X axis) of first pixel to include |
| -> Int | Index (Y axis) of first pixel to include |
| -> Int | Width of resulting image |
| -> Int | Height of resulting image |
| -> Image a | Original image |
| -> Image a | Cropped image |
Crop an image. If the supplied coordinates are greater than the size of the image, the image boundaries are used instead.
trim :: (Pixel a, Eq (PixelBaseComponent a)) => Image a -> Image a Source #
Trim the completely transparent edges of an image.
Since: 0.6.0
Rotation
rotate180 :: Pixel a => Image a -> Image a Source #
Rotate an image by 180°, i.e flip both vertically and horizontally.
Since: 0.2.0
Other
beside :: Pixel a => [Image a] -> Image a Source #
Create an image by placing several images side by side. If the images are of differnet heights the smallest height is used.
Since: 0.2.0