Skip to content

Pieces: Convert PNG pieces to Webp#100

Merged
veloce merged 44 commits into
lichess-org:mainfrom
SergioGlorias:piece-webp
Jun 18, 2026
Merged

Pieces: Convert PNG pieces to Webp#100
veloce merged 44 commits into
lichess-org:mainfrom
SergioGlorias:piece-webp

Conversation

@SergioGlorias

@SergioGlorias SergioGlorias commented Jun 17, 2026

Copy link
Copy Markdown
Member

Notes:

  • "mono" pieces is used? need for chessground? deleted
  • "Disguised" pieces is same image in all pieces: setted all to w.webp and b.webp
  • updated script to use webp

comparison:

assets/piece_sets

  • Before PR: 24,1 MiB (25 255 764)
  • After PR: 11,2 MiB (11 787 338) (-53.33% 📉)

@veloce

veloce commented Jun 18, 2026

Copy link
Copy Markdown
Collaborator

@SergioGlorias I think 'mono' can be removed yes.

This is still in draft, shall I wait to test that or is it good now?

@SergioGlorias

Copy link
Copy Markdown
Member Author

@veloce still has 14-piece sets to do.

@veloce

veloce commented Jun 18, 2026

Copy link
Copy Markdown
Collaborator

@SergioGlorias how are you converting the pieces? From png to webp or from svg? It would be nice to update the script that currently convert to png, to make it convert to webp.

@SergioGlorias

Copy link
Copy Markdown
Member Author

@veloce, I'm using https://squoosh.app to convert
Right now I'm working directly with the PNGs for a better comparison.
Regarding the script: the times I made scripts for Lila's stuff, I had to convert from SVG to PNG and then convert to WEBP.
Another issue is that I can manually adjust things that I can only improve by seeing them (like reducing the color palette for simple images).

@SergioGlorias SergioGlorias marked this pull request as ready for review June 18, 2026 14:26
@SergioGlorias SergioGlorias requested a review from veloce June 18, 2026 14:26
@veloce

veloce commented Jun 18, 2026

Copy link
Copy Markdown
Collaborator

I see. Thanks for the explanation, and for all the converting work!

We don't need to update the script right now, but it will be useful when we want to add a new piece set.

Do you think it is easy to modify the existing script to add another convert step from PNG to WEBP?

We shall do that in another PR.

@veloce veloce merged commit 30e9748 into lichess-org:main Jun 18, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants