From 75b0246e8c16dac6dba736b838b76d0dcf61dbd7 Mon Sep 17 00:00:00 2001 From: "Kirill Lipatov (Leency)" Date: Tue, 26 May 2020 10:36:15 +0000 Subject: [PATCH] notify: use image of any color depth notify3.png: pack image -1.5Kb without colors degradation git-svn-id: svn://kolibrios.org@7988 a494cfbc-eb01-0410-851d-a64ba20cac60 --- data/common/notify3.png | Bin 4373 -> 2955 bytes programs/system/notify3/notify.asm | 20 +++++++------------- 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/data/common/notify3.png b/data/common/notify3.png index 6231ea166343bd09813e40a0be1f3eacb3a0f09c..ce324e5f36354cd274a92c33feb69ef30f54facb 100644 GIT binary patch literal 2955 zcmV;63v~2}P)CHxpslT~v#_zcy1IjdgPWV1b#--oe0^_k zZ`m?RqCaj z?v8cFC@Um$!Mn&LQP1{aJzBECVBrl~THSFx{%rZ9f^z{Dz|4SSvxgs>7 zEJ>?8RjnX7h$B9-pK7a>T>aybPC_X1*^~U*aJ{2kTum$Y&|>)6e}iEZZBruf!doIB z8~e{#&8AC~a3+6dD*DJvu7xtamOc5xKQ=KM-=sSByF2l&H1xJONiz{ltpGBa0Nwef zv-dip>ntOT0LJc-kLeE>7#N}BM|ju)Y|8+U*gP160ARlW4toGDFE_Wb&(_lD+ST=a zc90|`E6Bp@xv}J+o4UZc=F`scw5;K(qSmRczWDg~q?*}hV1MT5`JR;2myX1#pWd&f z;pXP&myOPmhs%tC#e{mkeRHK%O>aO*P$@`YNr0wEjJQvf!9-$rcCFKl)9$U_^}6Tx zZmH3f+VXtN@M^>ETEXmVx8Xv#>QkrZL!RE0yxESz=qp!uSe?i~uj<$4@IQjJc)#a9 zsOf38?L469L28JKvCK4itUHwErp)|B&TJi7i<(ieFWpCl(;bDN8v~hofI!Jv;SYQRi%lhBC>000P@NklxQ@05Q%?@OlG_nRClj2)fyYI z!2$RmZFG>_AP7KV*i$5eAchDQ1xlh)bN`F=sg6{$ZN8Pfe;5}eIIQ6^|LzYQFH5*y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b|uZOP?*rq+St?4%)J8ryo2-GI1ORvG&NByFBna?!i=}rc0(=BG5a5FVCcrSf!5gbr zn}Khu2J8V}$kI9=1mHKcCB9gqJR4d@gCXzTymJ&Swk)w_r?RxR7VuMgKCx0d0vRF<;s+aVY!jtaL>V)}nNOGLQ)Uv@XU+I9Ql0>>6HI`!O=KY;*E%9>OOT*wmq-Zy zGj0NW@9BYGj4%fei2U~JufLu~PVRj>wk*9p0&tf`9^BWCR}2J5{I;O4!NvLz3Hvev za%T8iuLTOsxA7UMR6yUT)A#D?fdXWmw8LE*-uEO^hMbq$9JYXRLWyF`oCWx_nc6v0 z^6dGUy$SHWA?72>NBGy3pf6ex0Kdl<)Lz8?%&xt&KM!d1PsMgz^lKB~w5Bel5m3=a zMt~00PxxXb@brccqwqG~m(r6m0UD{U8Pf9abe00OLn>4XL7(jKqp*f$Re_jD3?X@4 z0+jPqf+tsbR#brUDK8*U^`wdr5B})$wO<48-(clGaODbUn4v&;FC+m^E<^=XA*JC8 zl>|Jg3Y=JnD_4La3XoS4P_dFgF;igyYFLzOmZ5;}!%x*x2t@@bc!5|$#t=sc!W&%O z@jlStD~}oeA}y}!V)Ya zX{pYka7N^;(?(xdg5|5Dq5`qj@F>cKhW8ab0r8+Bky?au1$Y$o?}K;%=L5E+trnq*DJpwyv;9pBZ)m9bDw4K} z0^xfjy?Noy0BPf!zxY)W$`#PdrP#|Sy%-?~o;oR%3DZ_gVEYTFFijF*KVipcIIMjo zn?!07P>K-XD8q*5VqS>w7>j^US4{$*TviZec^ec(fd)x9~us&1fbsj;D P00000NkvXXu0mjfuJ=Z~ diff --git a/programs/system/notify3/notify.asm b/programs/system/notify3/notify.asm index 64b8a5b158..cc150df08a 100644 --- a/programs/system/notify3/notify.asm +++ b/programs/system/notify3/notify.asm @@ -78,7 +78,7 @@ ;; ALLOCATE MEMORY FOR THIS stdcall mem.Alloc, edx - mov [img_data.rgb_obj], eax + mov [img_data.file], eax ;; READ ICONS mov dword [fi + 00], 0 @@ -87,12 +87,8 @@ mcall 70, fi ;; DECODE ICONS - stdcall dword [img.decode], dword [img_data.rgb_obj], ebx, 0 + stdcall dword [img.decode], dword [img_data.file], ebx, 0 mov dword [img_data.obj], eax - stdcall dword [img.to_rgb], dword [img_data.obj], dword [img_data.rgb_obj] - stdcall dword [img.destroy], dword [img_data.obj] - - ;; CALC HEIGHT mov eax, [text.lines] @@ -498,15 +494,13 @@ cmpe byte [params.icon], 0, @f movzx ebx, byte [params.icon] dec ebx - imul ebx, 24 * 24 * 3 - add ebx, [img_data.rgb_obj] + imul ebx, 24 mov edx, [window.height] shr edx, 1 sub edx, 12 - add edx, LINEH shl 16 - - mcall 7, , <24, 24> + + stdcall dword [img.draw], dword [img_data.obj], 12, edx, 24, 24, 0, ebx @@: ret @@ -764,7 +758,7 @@ library img, "libimg.obj" import img, img.to_rgb, "img_to_rgb2", \ img.decode, "img_decode", \ - img.destroy, "img_destroy" + img.draw, "img_draw" ;---------------------------- @@ -830,7 +824,7 @@ .ctrl rb 1 img_data: - .rgb_obj rd 1 + .file rd 1 .obj rd 1 timer: