Skip to content

0.13.0

Compare
Choose a tag to compare
@Tyriar Tyriar released this 31 Jan 13:17
· 8 commits to master since this release

Features

New web native PNG decoder (#122)

The bulk of the time this release was spent creating a new PNG decoder library and making it very polished and tested (currently ~3500 tests and > 97% coverage). The new library @lunapaint/png-codec is published on npm and is the first core component in Luna Paint to be open sourced! The goal was to build a fast and correct typescript-based library that runs in both browser or node contexts. It has a readable codebase and provides advanced insights into what went wrong when the file fails to decode.

The main wins this brings to Luna Paint so far are:

  • Loading PNGs will now retain their hue information even when completely transparent.
  • PNGs are now loaded without gamma correction applied.
  • Inspect image file and the warning/error status bar item described below.

The next steps for @lunapaint/png-codec is to write the encoder side of the library which will allow ultimate control for Luna Paint (and the user) over how the PNG will be saved.

Inspect image file

There's a new context menu in the explorer for inspecting low level details of image files for supported types. Currently only PNG is supported but this will be expanded as more progress is made on format decoders.

Details provided include:

  • Dimensions and other details included in the image header
  • Metadata extracted from PNG chunks
  • Warnings/errors encountered
  • Raw chunk details
  • The RGBA image data as a JSON array

Warnings/error status bar item

When errors or warnings are encountered during decoding, a new status bar item will show when file inspection is supported. A notification was considered for this but the status bar items were determined to be just as intuitive as a notification but less annoying.


Resize image and canvas by percentage (#130)

The Image: Resize and Image: Resize Canvas commands now support percentages, including in the shorthand so the following formats are now possible: w, w%, wxh, w%xh, wxh%

UX / Polish

  • When opening the image editor via the explorer, the editor is no longer focused by default. This was done initially to get keybindings working immediately, but caused problems if you actually wanted focus in the editor to copy, renamed, etc. The right way to get focus into the editor is to double click the explorer entry or to set the "workbench.list.openMode": "singleClick" setting.
  • The sub-categories in command names (eg. File > , Image >) have now moved into the main category (eg. Luna > File, Luna > Image). This allows commands to show up nicely in context menus in addition to keeping the sub-category idea in the command palette.
  • The Image: Canvas Size command has been renamed to Image: Resize Canvas to improve discoverability in the command palette.
  • In the Layers window, F2 (Enter on macOS) can now be used to rename the active layer.

Documentation

  • The extension readme got a refresh, it now has short and sweet tools and commands sections and points to the walkthrough for how to learn the specifics.
  • New getting started pages:
    • Inspect image file

Bug Fixes

  • Fix cmd+c, cmd+a, etc. on macOS not working properly in text fields (#127).
  • A 0 byte image will now attempt to be opened instead of the default "empty" image opening.
  • Fix the open documentation command to open the walkthrough instead of the VS Code Get Started page.
  • Crop to selection will now clamp the selection to the image bounds.
  • Status bar warnings will now appear to the left of the image mime type.
  • Fix an error when finishing a selection completely outside of the image canvas.
  • Fix the flip horizontal command cutting out the middle column when run on an image with odd width.