[lostwages] get rid of gifs when pngs are better

Jonathan Ernst Jonathan at ErnstFamily.ch
Fri Dec 10 17:12:30 CST 2004


I have converted all winehq's website gif images to png (I've let very 
small images in gif format as they are smaller than corresponding pngs) 
and then crushed all pngs (new and old) using pngcrush. As the new 
modified images are about 6MB you can download the images directory 
zipped here: http://ernstfamily.ch/images.zip

With this conversion we can spare about 0.8MB of image data. That might 
look like overkill but:
1) it could save some bandwith when you think about all the visitors 
this site gets
2) it could make the site a little faster
3) i prefer pngs over gifs for a lot of reasons

The attached patch fixes the image links in the website pages.

If you apply this patch (and even if you don't), please fix the cvs for 
the image files. They are stored as ASCII and thus are unreadable on 
windoze.

To make the changes you have to:
1)delete every single .gif file in images subdirectories (but not in the 
bannerads subdirectory)
2)delete every single .gif file in /images/ but not
 - blank.gif
 - checker.gif
 - grey_pixel.gif
 - winehq_border_bottom_left.gif
 - winehq_border_bottom_right.gif
 - winehq_border_dot_left.gif
 - winehq_border_dot_right.gif
 - winehq_border_top_left.gif
 - winehq_border_top_right.gif
3)overwrite the files in images directory with the files in the 
downloaded zip file
4)apply attached patch

Changelog:
- converted most gifs to png
- crushed (lossless) every png using pngcrush
- modified the links to images accordingly in templates
-------------- next part --------------
? images
Index: include/themes/winehq/content.template
===================================================================
RCS file: /home/wine/lostwages/include/themes/winehq/content.template,v
retrieving revision 1.8
diff -u -r1.8 content.template
--- include/themes/winehq/content.template	25 Mar 2003 20:37:22 -0000	1.8
+++ include/themes/winehq/content.template	10 Dec 2004 22:49:58 -0000
@@ -16,7 +16,7 @@
     <td>
       <table width="100%" border=0 cellpadding=0 cellspacing=0>
       <tr>
-	    <td width="100%"><a href="{$root}"><img src="{$root}/images/winehq_top_logo.gif" width=209 height=99 border=0 alt="Wine HQ"></a></td>
+	    <td width="100%"><a href="{$root}"><img src="{$root}/images/winehq_top_logo.png" width=209 height=99 border=0 alt="Wine HQ"></a></td>
         <td>
           <img src="{$root}/images/blank.gif" border=0 width=10 height=1 alt="">
         </td>
Index: templates/en/about.template
===================================================================
RCS file: /home/wine/lostwages/templates/en/about.template,v
retrieving revision 1.15
diff -u -r1.15 about.template
--- templates/en/about.template	1 Dec 2004 22:15:11 -0000	1.15
+++ templates/en/about.template	10 Dec 2004 22:47:26 -0000
@@ -1,6 +1,6 @@
 <!--TITLE:[About Wine]-->
 
-<img src="{$root}/images/glass.gif" width=248 height=399 border=0 align=right alt="Wine Logo">
+<img src="{$root}/images/glass.png" width=248 height=399 border=0 align=right alt="Wine Logo">
 
 <h1>About Wine</h1>
 
Index: templates/en/contributing.template
===================================================================
RCS file: /home/wine/lostwages/templates/en/contributing.template,v
retrieving revision 1.20
diff -u -r1.20 contributing.template
--- templates/en/contributing.template	8 Dec 2004 16:18:31 -0000	1.20
+++ templates/en/contributing.template	10 Dec 2004 22:47:34 -0000
@@ -460,7 +460,7 @@
 	  <input type="hidden" name="cmd" value="_xclick">
 	  <input type="hidden" name="business" value="donate at winehq.org">
 	  <input type="hidden" name="item_name" value="Wine donation">
-      <input type="image" src="{$root}/images/ppdonate.gif" name="submit"
+      <input type="image" src="{$root}/images/ppdonate.png" name="submit"
       align=absmiddle alt="Donate to Wine with PayPal!"> Our PayPal Account
       </li></form>
 
Index: templates/en/download-deb.template
===================================================================
RCS file: /home/wine/lostwages/templates/en/download-deb.template,v
retrieving revision 1.1
diff -u -r1.1 download-deb.template
--- templates/en/download-deb.template	8 Dec 2004 16:18:31 -0000	1.1
+++ templates/en/download-deb.template	10 Dec 2004 22:47:40 -0000
@@ -1,6 +1,6 @@
 <!--TITLE:[Wine for Debian based distributions]-->
 
-<h1><a name="debian"></a><img src="{$root}/images/distro/debian.gif" width="50" height="50" alt="Debian Linux" border="0">
+<h1><a name="debian"></a><img src="{$root}/images/distro/debian.png" width="50" height="50" alt="Debian Linux" border="0">
 Wine for Debian based distributions</h1>
 
 <p>Debian and Debian based distributions, such as Ubuntu, utilize a special tool
Index: templates/en/download-rh.template
===================================================================
RCS file: /home/wine/lostwages/templates/en/download-rh.template,v
retrieving revision 1.1
diff -u -r1.1 download-rh.template
--- templates/en/download-rh.template	3 Dec 2004 21:26:12 -0000	1.1
+++ templates/en/download-rh.template	10 Dec 2004 22:47:45 -0000
@@ -1,6 +1,6 @@
 <!--TITLE:[Wine for Red Hat based distributions]-->
 
-<h1><a name="redhat"></a><img src="{$root}/images/distro/redhat.gif" width="50" height="50" alt="RedHat Linux" border="0">
+<h1><a name="redhat"></a><img src="{$root}/images/distro/redhat.png" width="50" height="50" alt="RedHat Linux" border="0">
 Wine for Red Hat based distributions</h1>
 
 <p>This page lists the current Wine packages for various Red Hat based
Index: templates/en/download.template
===================================================================
RCS file: /home/wine/lostwages/templates/en/download.template,v
retrieving revision 1.51
diff -u -r1.51 download.template
--- templates/en/download.template	8 Dec 2004 16:18:31 -0000	1.51
+++ templates/en/download.template	10 Dec 2004 22:48:37 -0000
@@ -20,7 +20,7 @@
 
   <tr bgcolor="#ffffff">
     <td align=center><a href="{$root}/site/download-rh">
-	  <img src="{$root}/images/distro/redhat.gif" width="50" height="50" alt="RedHat Linux" border="0"></a>
+	  <img src="{$root}/images/distro/redhat.png" width="50" height="50" alt="RedHat Linux" border="0"></a>
     </td>
     <td> <b><a href="{$root}/site/download-rh">Red Hat</a></b>
          binary and source .rpms for RedHat 7.3, 8, 9, Fedora Core 1, 2 and 3, White Box Enterprise Linux 3.0 (RHEL 3.0 compatible)</td>
@@ -29,7 +29,7 @@
   
   <tr bgcolor="#ffffff">
     <td align=center><a href="http://sourceforge.net/project/showfiles.php?group_id=6241&package_id=79444">
-	  <img src="{$root}/images/distro/suse.gif" width="50" height="50" alt="SUSE Linux" border="0"></a>
+	  <img src="{$root}/images/distro/suse.png" width="50" height="50" alt="SUSE Linux" border="0"></a>
     </td>
     <td> <b><a href="http://sourceforge.net/project/showfiles.php?group_id=6241&package_id=79444">SuSE</a></b>
          binary and source .rpms for SuSE 8.1, 8.2, 9.0, and 9.1</td>
@@ -38,7 +38,7 @@
   
   <tr bgcolor="#ffffff">
     <td align=center><a href="http://sourceforge.net/project/showfiles.php?group_id=6241&package_id=80066">
-	  <img src="{$root}/images/distro/mandrake.gif" width="50" height="50" alt="LinuxMandrake" border="0"></a>
+	  <img src="{$root}/images/distro/mandrake.png" width="50" height="50" alt="LinuxMandrake" border="0"></a>
     </td>
     <td> <b><a href="http://sourceforge.net/project/showfiles.php?group_id=6241&package_id=80066">Mandrake</a></b> 
          binary .rpms for Mandrake 9.2, 10.0 and 10.1</td>
@@ -47,7 +47,7 @@
   
   <tr bgcolor="#ffffff">
     <td align=center><a href="http://sourceforge.net/project/showfiles.php?group_id=6241&package_id=6301">
-	  <img src="{$root}/images/distro/slackware.gif" width="50" height="50" alt="Slackware linux" border="0"></a>
+	  <img src="{$root}/images/distro/slackware.png" width="50" height="50" alt="Slackware linux" border="0"></a>
     </td>
     <td> <b><a href="http://sourceforge.net/project/showfiles.php?group_id=6241&package_id=6301">Slackware</a></b>
          binary .tgz for Slackware 10</td>
@@ -65,7 +65,7 @@
 
   <tr bgcolor="#ffffff">
     <td align=center><a href="{$root}/site/download-deb">
-	  <img src="{$root}/images/distro/debian.gif" width="50" height="50" alt="Debian linux" border="0"></a>
+	  <img src="{$root}/images/distro/debian.png" width="50" height="50" alt="Debian linux" border="0"></a>
     </td>
     <td> <b><a href="{$root}/site/download-deb">Debian</a></b> 
 	 binary and source .debs for Debian unstable</td>
@@ -74,14 +74,14 @@
 
   <tr bgcolor="#ffffff">
     <td align=center><a href="http://sourceforge.net/project/showfiles.php?group_id=6241&package_id=77562">
-	  <img src="{$root}/images/distro/freebsd.gif" width="50" height="54" alt="FreeBSD" border="0"></a>
+	  <img src="{$root}/images/distro/freebsd.png" width="50" height="54" alt="FreeBSD" border="0"></a>
     </td>
     <td> <b><a href="http://sourceforge.net/project/showfiles.php?group_id=6241&package_id=77562">FreeBSD</a></b> binary .tgz for FreeBSD 4.8, 4.9, 5.0, 5.1</td>
     <td><a href="mailto:gerald at pfeifer.com">Gerald Pfeifer</a></td>
   </tr>
   <tr bgcolor="#ffffff">
     <td align=center><a href="http://sourceforge.net/project/showfiles.php?group_id=6241&package_id=112520">
-	  <img src="{$root}/images/distro/windows.gif" width="50" height="54" alt="Windows" border="0"></a>
+	  <img src="{$root}/images/distro/windows.png" width="50" height="54" alt="Windows" border="0"></a>
     </td>
     <td> <b><a href="http://sourceforge.net/project/showfiles.php?group_id=6241&package_id=112520">Windows</a></b> binary .zips</td>
     <td><a href="mailto:puoti at inwind.it">Ivan Leo Puoti</a></td>
@@ -101,7 +101,7 @@
   <tr>
     <td align=center bgcolor="#ffffff">
       <a href="http://www.codeweavers.com/site/products/">
-        <img src="{$root}/images/distro/crossover.gif" 
+        <img src="{$root}/images/distro/crossover.png" 
          width="50" height="50" alt="CrossOver Office" border="0">
       </a>
     </td>
@@ -117,7 +117,7 @@
   <tr>
     <td align=center bgcolor="#ffffff">
       <a href="http://www.transgaming.com/"><img 
-        src="{$root}/images/distro/transgaming.gif" width="50" height="50" alt="Cedega" border="0"></a>
+        src="{$root}/images/distro/transgaming.png" width="50" height="50" alt="Cedega" border="0"></a>
     </td>
     <td align=left bgcolor="#ffffff">
       <b><a href="http://www.transgaming.com/">Cedega</a></b> - 
@@ -168,7 +168,7 @@
   <tr>
     <td align=center bgcolor="#ffffff">
       <a href="http://www.frankscorner.org/winetools/">
-        <img src="{$root}/images/distro/winetools.gif" 
+        <img src="{$root}/images/distro/winetools.png" 
          width="50" height="50" alt="Frank's Wine Tools" border="0">
       </a>
     </td>
@@ -184,7 +184,7 @@
 
 <p>
   <a href="http://www.winehq.org/site/download" target="_blank"><img
-  src="{$root}/images/download_wine.gif" border=1 width=88 height=31 vspace=0 hspace=5 align=left
+  src="{$root}/images/download_wine.png" border=1 width=88 height=31 vspace=0 hspace=5 align=left
   alt="Download Wine"></a>
   Use this image if you want to link to our download page.
 </p>
Index: templates/en/sponsor.template
===================================================================
RCS file: /home/wine/lostwages/templates/en/sponsor.template,v
retrieving revision 1.6
diff -u -r1.6 sponsor.template
--- templates/en/sponsor.template	2 Sep 2004 18:16:00 -0000	1.6
+++ templates/en/sponsor.template	10 Dec 2004 22:48:46 -0000
@@ -18,7 +18,7 @@
 	  <input type="hidden" name="cmd" value="_xclick">
 	  <input type="hidden" name="business" value="donate at winehq.org">
 	  <input type="hidden" name="item_name" value="Wine donation">
-	  <input type="image" src="images/ppdonate.gif" name="submit"
+	  <input type="image" src="images/ppdonate.png" name="submit"
       alt="Donate to Wine with PayPal!">
       </form>
     </td>


More information about the wine-patches mailing list