JuicyPixels-stbir-0.1.0.0: Scale JuicyPixels images with stb_image_resize

Safe HaskellNone
LanguageHaskell2010

Codec.Picture.STBIR

Contents

Synopsis

Resize function

resize Source #

Arguments

:: STBIRPixel a 
=> Options 
-> Int

new width

-> Int

new height

-> Image a 
-> Image a 

This function allows access to all "API levels" of the C library. Pass defaultOptions to use the easy API, or override whichever options you need.

Options

defaultOptions :: Options Source #

These are the options that correspond to the "Easy-to-use API".

data Flag Source #

Instances

flag_ALPHA_PREMULTIPLIED :: Flag Source #

Set this flag if your texture has premultiplied alpha. Otherwise, stbir will use alpha-weighted resampling (effectively premultiplying, resampling, then unpremultiplying).

flag_ALPHA_USES_COLORSPACE :: Flag Source #

The specified alpha channel should be handled as gamma-corrected value even when doing sRGB operations.

data Filter Source #

Constructors

FILTER_DEFAULT

use same filter type that easy-to-use API chooses

FILTER_BOX

A trapezoid w/1-pixel wide ramps, same result as box for integer scale ratios

FILTER_TRIANGLE

On upsampling, produces same results as bilinear texture filtering

FILTER_CUBICBSPLINE

The cubic b-spline (aka Mitchell-Netrevalli with B=1,C=0), gaussian-esque

FILTER_CATMULLROM

An interpolating cubic spline

FILTER_MITCHELL

Mitchell-Netrevalli filter with B=1/3, C=1/3

data Scale Source #

Specify scale explicitly for subpixel correctness

Constructors

Scale 

data Region Source #

Specify image source tile using texture coordinates

Constructors

Region 

Fields

Supported pixel types