Skip to content

Image version 0.28.0

Compare
Choose a tag to compare
@kipcole9 kipcole9 released this 06 Apr 05:04
· 404 commits to main since this release

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 basically Image.warp_perspective/4 with algorithmically derived destination parameter.

  • Adds Image.map/2 which applies a transformation matrix (not a convolution kernel) to an image. A transformation matrix can be returned from Image.transform_matrix/3. These two functions underpin Image.warp_perspective/4.

  • Adds Image.crop/2 which is a variation of Image.crop/5 that takes the same format of bounding box as that applied to Image.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.