Image version 0.28.0
Bug Fixes
- Fixes resizing images with alpha bands. Resizing images with alpha bands requires premultiplying the alpha band into the image and reversing that after resizing.
Enhancements
-
Adds
Image.warp_perspective/4
to apply a warp transformation to an image. Thanks very much to @sodapopcan for the PR and collaboration. -
Adds
Image.straighten_perspective/3
to apply a warp perspective that straighens the image. It is basicallyImage.warp_perspective/4
with algorithmically deriveddestination
parameter. -
Adds
Image.map/2
which applies a transformation matrix (not a convolution kernel) to an image. A transformation matrix can be returned fromImage.transform_matrix/3
. These two functions underpinImage.warp_perspective/4
. -
Adds
Image.crop/2
which is a variation ofImage.crop/5
that takes the same format of bounding box as that applied toImage.warp_perspective/4
making it easy to apply a warp transform and then crop to the transformed area. Note that cropping requires that the bounding box be a rectangle, not an arbitrary quadrilateral.