From 79db167ed90da31698ad87534e46e06094099c2c Mon Sep 17 00:00:00 2001 From: Daniel Thompson Date: Sun, 10 Jan 2021 18:04:56 +0000 Subject: [PATCH] apps: play2048: Optimized the icon a little wasp-os uses a rather eccentric "2-bit" RLE encoding which works best when there are only three colors (and black) in a single line. Modify the screenshot slightly to allow it to be encoded with fewer palette updated. --- res/2048_icon.png | Bin 7768 -> 8184 bytes wasp/apps/play2048.py | 75 +++++++++++++++++------------------------- 2 files changed, 31 insertions(+), 44 deletions(-) diff --git a/res/2048_icon.png b/res/2048_icon.png index 4855c7c1c1b0765ebd969823875f4902bcceddc9..549e893503e4f130e317c8205f3eace887e59f52 100644 GIT binary patch delta 4010 zcmV;b4^{BkJorD5BLWO_lgI%bf32BmcI!G0g#U9Dy#&s~ayXvTJLu*22THPR$H^Vu zi%%>?14yC@1%OfWfB#+TKm2%8vhpG2SYp)t_~MJLoMe6c)ctL=-{1Qup11h><+}3M z4a+6R(H(#0^9^%dHxC2Hp>h_U4CQ{_Xss-dbjE4Et+U4joctQ)Dkp|-xh-dr zbLTwY!R2!%IOLO`^wX@=J1UQ}H&m{rzJuc8@r2^St25){`0=_4pPjF^i=Rez{XDa; z*Kx&qU(WTr*2rqDd91Gbe~3%txu|Q2`-}%0E_eI2$S3g|I8Xai_+$lpJCG0Eb>q`b zF&4isX0PPQ^O?~7>D9&0YM2cME-fwuM@)~r3a*}$nL{MZ>n+cGvZt7XMK-%MJyp_3-yj8;7PEQpDT zEw@HDD=@FRFi>(^BVcSio{<;5VinC?4-eZA=)7!R@OZ}9OkII>`Bdsik^_f#qxDtd ziq6Dbe|euTzZCvrX({pI5^V?A1=@IX>3szSZj>xc2E3dM6T@1mr)3?NmnnVOVAKp_ z_1-5_T(eI-Qy&eAtZrN{Y1$&@ddCry8$46OOexGwK-b}AHDc@=HwKE$ zSD~frm3wIsaGV399;ud@V`!^~G>MJMm@=<`r8#m4$__j*-2kTn1v;)6l}N=$JvGu> ze`7%8V+g}~$biinr|z&VEQ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