JuicyPixels-extra-0.2.0: Efficiently scale, crop, flip images with JuicyPixels

Copyright© 2016–2017 Mark Karpov
LicenseBSD 3 clause
MaintainerMark Karpov <markkarpov@openmailbox.org>
Stabilityexperimental
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

Codec.Picture.Extra

Contents

Description

Utilities for image transformation with JuicyPixels.

Synopsis

Scaling

scaleBilinear Source #

Arguments

:: Int

Desired width

-> Int

Desired height

-> Image PixelRGB8

Original image

-> Image PixelRGB8

Scaled image

Scale image using bi-linear interpolation. This is specialized to PixelRGB8 only for speed (polymorphic version is easily written, but it's more than twice as slow).

Cropping

crop Source #

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 given image. If supplied coordinates are greater than size of original image, image boundaries are used instead.

Rotation

flipHorizontally :: Pixel a => Image a -> Image a Source #

Flip image horizontally.

flipVertically :: Pixel a => Image a -> Image a Source #

Flip image vertically.

rotateLeft90 :: Pixel a => Image a -> Image a Source #

Rotate image to the left by 90°.

rotateRight90 :: Pixel a => Image a -> Image a Source #

Rotate image to the right by 90°.

rotate180 :: Pixel a => Image a -> Image a Source #

Rotate image by 180°, i.e flip both vertically and horizontally.

Since: 0.2.0

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

below :: Pixel a => [Image a] -> Image a Source #

Create an image by placing several images in a vertical stack. If the images are of differnet widths the smallest width is used.

Since: 0.2.0