Repository navigation
3.17.0
·
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.framesis deprecated: it's a
number, unlikeAnimation.frames, which is an array. It will be removed in 4.0.Colors: the color helpers moved out ofImageinto their own class, with the same results:
Colors.fromRGBA(),fromRGB(),fromHSLA(),fromHSL(),toRGBA(),toRGB(),toHSLA()(new: a color as
HSLA values) andgradient().ResizeModes,SVGScaleModesandFrameDisposalModes: 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_*andFrame.DISPOSAL_*: useResizeModes.*,SVGScaleModes.*and
FrameDisposalModes.*(Image.RESIZE_AUTObecomesResizeModes.AUTO). The old names keep working and will be
removed in 4.0. They are plain read-only properties now instead of getters.- The
absoluteargument ofopacity(),red(),green(),blue(),lightness(),saturation()(and the
absoluteoption ofAdjustOptions): these methods scale by default; setting a fixed value is removed in 4.0.
For a fixed color, userecolor(). Image.rgbaToColor(),rgbToColor(),hslaToColor(),hslToColor(),rgbaToHSLA(),colorToRGBA(),
colorToRGB()andgradient(): use theColorsmethods 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.