Safe Haskell | None |
---|---|
Language | Haskell2010 |
- resize :: STBIRPixel a => Options -> Int -> Int -> Image a -> Image a
- data Options = Options {}
- defaultOptions :: Options
- data Flag
- flag_ALPHA_PREMULTIPLIED :: Flag
- flag_ALPHA_USES_COLORSPACE :: Flag
- data Edge
- data Filter
- data Colorspace
- data Scale = Scale {}
- data Region = Region {}
- class (Pixel a, STBIRComponent (PixelBaseComponent a)) => STBIRPixel a where
- class STBIRComponent a where
- data Datatype
Resize function
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
Options | |
|
defaultOptions :: Options Source #
These are the options that correspond to the "Easy-to-use API".
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.
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 Colorspace Source #
Specify scale explicitly for subpixel correctness
Specify image source tile using texture coordinates
Supported pixel types
class (Pixel a, STBIRComponent (PixelBaseComponent a)) => STBIRPixel a where Source #
All types currently covered by JP's Pixel
are supported.
alphaIndex :: a -> Maybe Int Source #
class STBIRComponent a where Source #