Skip to content

Commit

Permalink
Workflows: re-export grayscale icons to make guidelines_enforcer's ic…
Browse files Browse the repository at this point in the history
…on check happy

The glyph build task seems to be working perfectly fine with icons of bit depth
lower than 8bpp, but the guidelines_enforcer enforces 8bpp.

Note that the final app binary size is unaffected by this change, as the glyph
build task reduces the bit per pixel again.
  • Loading branch information
danimoh committed Oct 28, 2024
1 parent bfcf7ec commit 35b0221
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,16 @@ DISABLE_STANDARD_APP_FILES = 1
# control, also Colors > Dither might be used.
# - Set the Layer > Layer Boundary Size to the intended size of the final image, centering the content. Then Image > Fit
# Canvas to Layers.
# - Export the image as gif, which should be saved with the desired bits per pixel, if following these steps.
# - Save the icon as xcf with the indexed color map which can be used for future changes to the image.
# - For binary black/white icons: export the icon with indexed color mode as gif, which will save as 1bit-per-pixel.
# For grayscale icons: The guidelines_enforcer.yml workflow expects grayscale images to have 8bit-per-pixel depth
# (even though the glyph build task seems to be compatible with lower bit-per-pixel), therefore change the Image >
# Mode to Grayscale and then export as gif. Do not overwrite the xcf file, to keep it in indexed mode.
# For some reason, for glyphs/app_nimiq_64px.gif, but not for the other icons, this made the glyph build task complain
# that the image is not indexed. So not quite sure yet, what the proper procedure would be here. Also tried, re-export
# of app_nimiq_64px.gif via https://www.photopea.com/, which exports with a color map with 256 entries, excess entries
# simply being filled up as black, but that still had 4bpp depth the enforcer complained about. Switching to Grayscale
# and then back to an indexed palette with 32 colors seems to have done the trick.
ICON_NANOS = icons/app_nimiq_16px.gif
ICON_NANOX = icons/app_nimiq_14px.gif
ICON_NANOSP = icons/app_nimiq_14px.gif
Expand Down
Binary file modified glyphs/app_nimiq_64px.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified icons/app_nimiq_32px.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified icons/app_nimiq_40px.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 35b0221

Please sign in to comment.