Skip to content

3.17.0

Choose a tag to compare

@matmen matmen released this 07 Nov 22:20
· 42 commits to master since this release
Immutable release. Only release title and notes can be modified.

3.17.0

New

  • Image.recolor(color): sets the RGB of every pixel to a color and keeps each pixel's alpha, for silhouettes
    and tints: image.recolor(0xffffffff) makes every pixel white, keeping its transparency.
  • AnimationEncoder.frameCount: how many frames were added. AnimationEncoder.frames is deprecated: it's a
    number, unlike Animation.frames, which is an array. It will be removed in 4.0.
  • Colors: the color helpers moved out of Image into their own class, with the same results:
    Colors.fromRGBA(), fromRGB(), fromHSLA(), fromHSL(), toRGBA(), toRGB(), toHSLA() (new: a color as
    HSLA values) and gradient().
  • ResizeModes, SVGScaleModes and FrameDisposalModes: the constants have classes of their own, with the same
    values: image.resize(256, ResizeModes.AUTO, ResizeModes.BICUBIC), Image.renderSVG(svg, 512, SVGScaleModes.WIDTH),
    new Frame(w, h, {disposalMode: FrameDisposalModes.BACKGROUND}).

Deprecated

  • Image.RESIZE_*, Image.SVG_MODE_* and Frame.DISPOSAL_*: use ResizeModes.*, SVGScaleModes.* and
    FrameDisposalModes.* (Image.RESIZE_AUTO becomes ResizeModes.AUTO). The old names keep working and will be
    removed in 4.0. They are plain read-only properties now instead of getters.
  • The absolute argument of opacity(), red(), green(), blue(), lightness(), saturation() (and the
    absolute option of AdjustOptions): these methods scale by default; setting a fixed value is removed in 4.0.
    For a fixed color, use recolor().
  • Image.rgbaToColor(), rgbToColor(), hslaToColor(), hslToColor(), rgbaToHSLA(), colorToRGBA(),
    colorToRGB() and gradient()
    : use the Colors methods of the same role (Colors.fromRGBA() and so on).

Documentation

  • imagescript.dev has a new look: the logo's colors, clearer type, signatures and
    parameters that are easier to scan, and a sidebar grouped into classes, functions, interfaces and types. Inherited
    members are hidden by default (Settings → Inherited shows them), deprecated APIs are tagged and grouped at the end.
  • Every parameter is described now.