-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 9c904a6
Showing
7 changed files
with
1,001 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
node_modules/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2022 Adam Gastineau | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Analogue Pocket Framework Image Processor | ||
|
||
Simple image processing for APF platform images. | ||
|
||
![Analogue platform image demo](https://images.analogue.co/platform_art.2ad219560f99a334bf59ef9641c433f6.png?auto=format&w=1200&q=100&s=74e9636d11c828a74b67f9a060a59abb) | ||
|
||
## Creation | ||
|
||
The creation script converts a 521x165 PNG image into a 16 bit greyscale bitmap, where the upper byte stores the brightness of the pixel, where white is `0x00` and black is `0xFF`. At the moment, the lower byte is always `0x00`. This image is stored rotated 90 degrees counter-clockwise (creating a resolution of 165x521). | ||
|
||
To prepare an image for display on the Pocket: | ||
|
||
1. Create a 521x165 greyscale image (transparent pixels will be converted into white) | ||
2. Save image as PNG | ||
3. Run: | ||
|
||
```bash | ||
npm run create input.png <platform name>.bin | ||
``` | ||
|
||
4. Place this image in the appropriate platform folder in the `/Platforms/_images/`. [See the Analogue docs for more information](https://www.analogue.co/developer/docs/packaging-a-core#graphical-asset-formats) | ||
|
||
## Extraction | ||
|
||
Extracting an existing platform image will invert the color (back to what it started as) and revert the 90 degree rotation performed during creation. | ||
|
||
To extract a previously created APF platform image, run: | ||
|
||
```bash | ||
npm run extract input.bin output.png | ||
``` | ||
|
Oops, something went wrong.