Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Images linting: ensure that all images conform specification #3802

Merged
merged 9 commits into from
Aug 7, 2024

Conversation

skyhawkillusions
Copy link
Contributor

@skyhawkillusions skyhawkillusions commented Jul 22, 2024

What's new

  • Since there was substantial inconsistency in the background design of the icon assets, I took the effort to standardize all of these. Any icons with transparent/orange BG has been converted to pure monochrome black/white
  • fbt: added lint_img, format_img targets for processing images
  • fbt: also added lint_all and format_all targets, invoking all linters and formatters
  • github: now checking image formatting in linter workflow

Verification

  • Upon sideloading these icons, check any and all applications that utilize the changed icons.
  • Check new targets, try adding images straight from image editors and run fbt lint_img

Checklist (For Reviewer)

  • PR has description of feature/bug or link to Confluence/Jira task
  • Description contains actions to verify feature/bugfix
  • I've built this code, uploaded it to the device and verified feature/bugfix

@hedger hedger added the UI Affects UI label Jul 22, 2024
@hedger
Copy link
Member

hedger commented Jul 22, 2024

I went on and re-processed all .png files in assets and applications folders with

for f in `find assets applications -iname "*.png"`; do echo $f; magick $f -alpha off +profile "*" -define png:exclude-chunks=date,time -threshold "50%" -colors 2 $f.o && mv $f.o $f; done

or

find assets applications -iname "*.png" | xargs -P `getconf _NPROCESSORS_ONLN` -I F -n 1 sh -c 'mogrify -alpha off +profile "*" -define png:exclude-chunks=date,time -threshold "50%" -colors 2 F'

@hedger hedger self-assigned this Jul 27, 2024
hedger and others added 2 commits August 7, 2024 01:33
@hedger hedger requested a review from drunkbatya as a code owner August 7, 2024 00:29
hedger
hedger previously approved these changes Aug 7, 2024
@skotopes skotopes changed the title Change all icons to be white background Images linting: ensure that all images conform specification Aug 7, 2024
@skotopes skotopes merged commit 41fcead into flipperdevices:dev Aug 7, 2024
11 checks passed
ofabel pushed a commit to ofabel/flipperzero-firmware that referenced this pull request Sep 26, 2024
…devices#3802)

* Change all icons to be white background
* assets: re-processed all *.png images to 1-bit
* assets: also stripped profile data from .pngs
* assets: also stripped datetime from metadata (`-define png:exclude-chunks=date,time`)
* scripts: added image linter and formatter; fbt: added `lint_img` && `format_img` targets; github: integrated image lint step into CI
* scripts: imglint: fixed deprecation warning
* images: applied `format_img`
* fbt: added `lint_all` and `format_all` targets; docs: updated for new targets

Co-authored-by: hedger <[email protected]>
Co-authored-by: hedger <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
UI Affects UI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants