Aseprite extension to open a reference image
A fork of Enmarimo reference viewer
This is a quick although messier implementation with a few fixes
(and yes Enmarimo, steal as much code as you want)
- fixed sizing error when image is at 0 width/height
- infinite zoom, original version was originally capped at 200%
- fixed integer inaccuracy at high zoom, original implementation used point() which relies on integer casting, fixed by using arrays
- limit file selection to images only and allow user to freely select initial file directory without a console warning
- allow script to run both as a extension and as a regular script for debugging/development purposes
- fixed pixel snap on zoom, allow subpixel zoom
- border added
- checkerboard background added based on preference settings
- custom eye dropper icon beside cursor when using eye dropper
Create the extension from the repository. In Windows, open a PowerShell and run:
git clone https://github.com/arttale/aseprite_reference_viewer
cd aseprite_reference_viewer
scripts\create_extension.ps1
It will create the extension inside build\ folder.
In Aseprite open the Preferences dialog window by clicking on Edit > Preferences... in the top bar menu.
Then, in the Extensions tab click on the Add Extension button and find the reference_viewer.aseprite-extension downloaded before.
To open the Reference Viewer click on the View > Reference Viewer menu.
The Reference Viewer dialog window will open. The window can be resized and moved. Then click Select File to open an image (aseprite will warn you about the script accessing an external image).
With an image opened, it is possible to:
- zoom in and out using the slider or the mouse wheel.
- click on the Fit button to fit the image into the dialog window.
- move the image by dragging it.