From c3c7b233eb17aa24a6e8a8cacf21de712ca39a5b Mon Sep 17 00:00:00 2001
From: Bob Vincent <bobvin@pillars.net>
Date: Sat, 16 Apr 2011 12:22:26 -0400
Subject: [PATCH] Issue #908282 by jbrown, Damien Tournoud, Dries, sun, David_Rothstein, webchick: Remove unnecessary I/O from theme_image().

---
 includes/theme.inc                      |    6 +++---
 misc/watchdog-error.png                 |  Bin 775 -> 780 bytes
 misc/watchdog-ok.png                    |  Bin 409 -> 375 bytes
 misc/watchdog-warning.png               |  Bin 319 -> 318 bytes
 modules/simpletest/simpletest.pages.inc |   12 ++++++------
 modules/update/update.report.inc        |    8 ++++----
 themes/seven/template.php               |    4 ++--
 7 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/includes/theme.inc b/includes/theme.inc
index 5325ff737bf2ed31d11e99b4f4a735ab4f1323a4..9bd706209a9ac4d5f9367b2058a285787d958a37 100644
--- a/includes/theme.inc
+++ b/includes/theme.inc
@@ -1760,10 +1760,10 @@ function theme_table($variables) {
  */
 function theme_tablesort_indicator($variables) {
   if ($variables['style'] == "asc") {
-    return theme('image', array('path' => 'misc/arrow-asc.png', 'alt' => t('sort ascending'), 'title' => t('sort ascending')));
+    return theme('image', array('path' => 'misc/arrow-asc.png', 'width' => 13, 'height' => 13, 'alt' => t('sort ascending'), 'title' => t('sort ascending')));
   }
   else {
-    return theme('image', array('path' => 'misc/arrow-desc.png', 'alt' => t('sort descending'), 'title' => t('sort descending')));
+    return theme('image', array('path' => 'misc/arrow-desc.png', 'width' => 13, 'height' => 13, 'alt' => t('sort descending'), 'title' => t('sort descending')));
   }
 }
 
@@ -1876,7 +1876,7 @@ function theme_more_help_link($variables) {
  */
 function theme_feed_icon($variables) {
   $text = t('Subscribe to @feed-title', array('@feed-title' => $variables['title']));
-  if ($image = theme('image', array('path' => 'misc/feed.png', 'alt' => $text))) {
+  if ($image = theme('image', array('path' => 'misc/feed.png', 'width' => 16, 'height' => 16, 'alt' => $text))) {
     return l($image, $variables['url'], array('html' => TRUE, 'attributes' => array('class' => array('feed-icon'), 'title' => $text)));
   }
 }
diff --git a/misc/watchdog-error.png b/misc/watchdog-error.png
index f7e60e5238ee0f613c73d556f69f7ff52be7a8bb..db05365aa51c5d77ebdf732aa642d94da8613f25 100644
GIT binary patch
delta 756
zcmV<Q0t@|z28;%fB!AOML_t(I%axPaOB+!b#pl^4(YS9U3MvM~s9@a2Jt}T-c~K!E
zxS=RQM8Tnvnt+OmphbgOG^LP#LD~nOT9B&rp->+Rni#dx)-4)+I{jua(~PF2J#ZQB
z%-rAo?)lDTm>{xPEbQ9anqhf)8H<aHn4O)4$z(E2O--@Pzkg_BV}rHXY%rV6ct1Ld
zubrLnYBc!L+KR2NE^r)&iHQm5^?LSikYT&s4p&bP?wgu$S67GI>T29nRN%U#1eb+{
zxX8=HKFvo)MtIn8&`M~)-P?<Mtrouedfe93z*|{~>(WwO6&2w^t;WyXTzt>U!bh6-
z_4PfkY;$uHZh!jl(A*5ae0n`@%F1w6T#U>7d|dbUi{H-E)A1oE2RfY&BE;cvuvV)T
z4=pY5H8vtpM*{=6EGUpbcuhw{;8dYNM@I*gN+l<N$QQ%T__*kcZ){Am=xlCIGI!8_
zFJ&^EBqhN{$7Na8Nf;TkzP^sb?rw=MuE9YB6Azgt$bVi!0zC2Y*iKDFBb|akY0T>C
zDtrwMxT~#&x2j6?<!pXl0@<3J6ppl)m<SJn+%Yk5(Y%gMK_D%&va%xP<)*wGS1b$f
zA1d0VJb4Io92*N)WF+3n<*25J2%x2<CBrtE>d%XJXh>QKg)mSD6c2Y)6pq5f@k*&g
zc6PQ?0DmnkEU+^(Gh$u>^_t>fq(!@JZIbspVPQB74Mi1MA(zWJ!6RNqqY<CUrwhu<
zQ^-D*e?sGc;^EhekPvLe#i5M+6sqC7#*0rVe~&)V4nI^Xn8*WTbTsxUD|}x3zU)xP
z3<MdVYRbt^g+jqSf_{s?J2bFMW}jzd;2X8}G;KLq$jdS9?)T*_b*zH?%*@QRJc9(l
z*g@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1TCH|xWMqT@R4<qG
h&op$R%Hp3tqu+M?YQ;)-$Tt80002ovPDHLkV1lr2YybcN

diff --git a/misc/watchdog-ok.png b/misc/watchdog-ok.png
index 6ebea3e53d5fd889eb4ada215506c6e0e48b48bf..1d7baa06e2d09c704e47d4955a763066398e932c 100644
GIT binary patch
literal 375
zcmV--0f_#IP)<h;3K|Lk000e1NJLTq000sI000sQ1^@s6R?d!B0003#Nkl<ZILl*T
z7!+WIOg|9crqqz>K>VL!vGfTbPm^3j+QEh_mA=Q|!Q%xKQ6<NaY_K8AWxg<^3noBa
z!$zth#b85L$oyo;7tR2R=m9Y|sfL6=4f)SdCt3{@(FbB)QVp>L;?H11y2K{{MGSyg
zkW@oNfcOH~kg1X@poWOyQp^g(ia^YUMQ$G0kcHCc8HAZlfg&>aY@GyFyi8^V(Elt*
z;*ro8`p%Fn5Ce^7MtlZcfd}Li$qumM6*AmFd=V@*Nn$ZHhPViYgFoD$r7~|BT)0(%
z>>{Wu-!QoIcmh>P6BnrSq}t$y&63&%r0;{--QtsgvO2^kx)n0QK--_g4THGmErTPs
z8&Fo9w5VPxU5H{(zr-x4YgkE5GpxYeyd4-zKN;prorStalH39U6upYjSW+d{H2?sW
Vcv8)9RPO))002ovPDHLkV1jaCo!<Ze

literal 409
zcmV;K0cQS*P)<h;3K|Lk000e1NJLTq000pH000pP1^@s6J8eh$0004CNkl<Zc-ozk
zKTE@45Qk5+8B7IB)HHdsbjToxx;Qur;=jekMQ{)t6dXhy1xFPfDnTi9s7Q$B6X;iP
z5f$779bI%%kWR0^94{dfHED+@IdXT;d&z~Qlx;zwQw2{Pw<)LrNxrxtqQQ0q`z#2=
zGtCs|AaPq2th3<K`J~m-ax?|dS`lmm37WKFtf6@r=$y+bSOAjQ?cYK32<VCPIRxY2
zg9V4?F`7p~DOr;x=mYmGIJH707)aHjpa3dB`$f`V!MV62qjL<^j>@GZ9v5CXA>Owu
zAy`zK_@b5GrD&C)<1fi0kj#m75EUZU!2>_@%D&n}cS?|u%*T?zd8bL;MZBe^d!y;%
zEULu6-;OU0doLE%?JL}0I6g8x2!?=`DM5pQQ(t2dPl2f>^eG6;%-<jm0<rl+QZ3ij
z6ouRpUbQc-v5h93*|%y6i}N`pOtcwLQQL4cr%-$Yp|OBwC+{L*00000NkvXXu0mjf
Deb%b2

diff --git a/misc/watchdog-warning.png b/misc/watchdog-warning.png
index 5d33a512ee78ecd82a36763d4588ffa9ba45b767..d8dced8890f22165848acc20297fdb93fc2a77ff 100644
GIT binary patch
literal 318
zcmV-E0m1%>P)<h;3K|Lk000e1NJLTq000sI000sQ1^@s6R?d!B00036Nkl<ZILl*T
zpcj}vefob8rr3~E$GrcqS)uzsIy(A4MF#!($Oy(zgM7$y%^{!vf8R2K@tP%i<hcrD
z(BBt~|LaR27{n&oRbbcb1G?r3(|-p`Mlc4k*DN5>RbbaVU;<+Y3q~-8@ria7*fqO=
zuDQbm#t!C;U<~80nM0(jKnDH0!3@U^W{hBrEJn~(AVW@X^Zozt3Nsu#m@<Mfve?=g
z`uJT1cFhH56kMOd1jgv%I9&yH%_g90&ae=L*G|FVDzIygvtVEcBStXBCWqlFuxr-(
z{{MfN1p_-6GJ-KSxwZXht^ymh+VB7W{j4P6wY>&d!|Feo*ausn`;dtl0NW0KXl_Kc
QhX4Qo07*qoM6N<$f(x6B%m4rY

literal 319
zcmV-F0l@x=P)<h;3K|Lk000e1NJLTq000pH000pP1^@s6J8eh$00037Nkl<Zc-o!N
zy=uZx6u|MEBtDMX7Fu<?yGdUlFW>`o&l8j`g>-Om=ul|x;^5$5L7|1};Nalk;NZ}u
zL-*=w&J_;{N75u0esDkF@aI~2D~ci{R)xg_KHs|-ztk}Z0<1jb_Xo&nh*!R1>f!zy
zjQF|1HKm5^zW~EKgZ5lgyke46>}*sWAZ8yAxTavm);3fd2%ov;-->Zkv9S%+0>bCG
z&o%i&4r_<08zAXBQ6mP-M?M}_4pY}aGI#o^nW>Q#OD7}j*+krPji?wV6$`fz{dlaA
z6(6pku7I3<;~K8eKH|(3)FqI!Z~7rsV}`umBEHp1(f1ePZ?GcING-1->kr*=e`ss|
RHogD=002ovPDHLkV1j|ik2U}R

diff --git a/modules/simpletest/simpletest.pages.inc b/modules/simpletest/simpletest.pages.inc
index 732d6418cbe498be1611db419bd1dc8e2844fc32..31d0b2ce773bedf90387fbf55ecd6d8cf36ea4a3 100644
--- a/modules/simpletest/simpletest.pages.inc
+++ b/modules/simpletest/simpletest.pages.inc
@@ -82,8 +82,8 @@ function theme_simpletest_test_table($variables) {
   // Define the images used to expand/collapse the test groups.
   $js = array(
     'images' => array(
-      theme('image', array('path' => 'misc/menu-collapsed.png', 'alt' => t('Expand'), 'title' => t('Expand'))) . ' <a href="#" class="simpletest-collapse">(' . t('Expand') . ')</a>',
-      theme('image', array('path' => 'misc/menu-expanded.png', 'alt' => t('Collapse'), 'title' => t('Collapse'))) . ' <a href="#" class="simpletest-collapse">(' . t('Collapse') . ')</a>',
+      theme('image', array('path' => 'misc/menu-collapsed.png', 'width' => 7, 'height' => 7, 'alt' => t('Expand'), 'title' => t('Expand'))) . ' <a href="#" class="simpletest-collapse">(' . t('Expand') . ')</a>',
+      theme('image', array('path' => 'misc/menu-expanded.png', 'width' => 7, 'height' => 7, 'alt' => t('Collapse'), 'title' => t('Collapse'))) . ' <a href="#" class="simpletest-collapse">(' . t('Collapse') . ')</a>',
     ),
   );
 
@@ -426,10 +426,10 @@ function simpletest_result_status_image($status) {
 
   if (!isset($map)) {
     $map = array(
-      'pass' => theme('image', array('path' => 'misc/watchdog-ok.png', 'alt' => t('Pass'))),
-      'fail' => theme('image', array('path' => 'misc/watchdog-error.png', 'alt' => t('Fail'))),
-      'exception' => theme('image', array('path' => 'misc/watchdog-warning.png', 'alt' => t('Exception'))),
-      'debug' => theme('image', array('path' => 'misc/watchdog-warning.png', 'alt' => t('Debug'))),
+      'pass' => theme('image', array('path' => 'misc/watchdog-ok.png', 'width' => 18, 'height' => 18, 'alt' => t('Pass'))),
+      'fail' => theme('image', array('path' => 'misc/watchdog-error.png', 'width' => 18, 'height' => 18, 'alt' => t('Fail'))),
+      'exception' => theme('image', array('path' => 'misc/watchdog-warning.png', 'width' => 18, 'height' => 18, 'alt' => t('Exception'))),
+      'debug' => theme('image', array('path' => 'misc/watchdog-warning.png', 'width' => 18, 'height' => 18, 'alt' => t('Debug'))),
     );
   }
   if (isset($map[$status])) {
diff --git a/modules/update/update.report.inc b/modules/update/update.report.inc
index 8e9dbae43d69eae4cd957e96de527db30ad26585..3f5933acb1feeb6caf0ed61d823aaf0269d7f852 100644
--- a/modules/update/update.report.inc
+++ b/modules/update/update.report.inc
@@ -57,25 +57,25 @@ function theme_update_report($variables) {
     switch ($project['status']) {
       case UPDATE_CURRENT:
         $class = 'ok';
-        $icon = theme('image', array('path' => 'misc/watchdog-ok.png', 'alt' => t('ok'), 'title' => t('ok')));
+        $icon = theme('image', array('path' => 'misc/watchdog-ok.png', 'width' => 18, 'height' => 18, 'alt' => t('ok'), 'title' => t('ok')));
         break;
       case UPDATE_UNKNOWN:
       case UPDATE_FETCH_PENDING:
       case UPDATE_NOT_FETCHED:
         $class = 'unknown';
-        $icon = theme('image', array('path' => 'misc/watchdog-warning.png', 'alt' => t('warning'), 'title' => t('warning')));
+        $icon = theme('image', array('path' => 'misc/watchdog-warning.png', 'width' => 18, 'height' => 18, 'alt' => t('warning'), 'title' => t('warning')));
         break;
       case UPDATE_NOT_SECURE:
       case UPDATE_REVOKED:
       case UPDATE_NOT_SUPPORTED:
         $class = 'error';
-        $icon = theme('image', array('path' => 'misc/watchdog-error.png', 'alt' => t('error'), 'title' => t('error')));
+        $icon = theme('image', array('path' => 'misc/watchdog-error.png', 'width' => 18, 'height' => 18, 'alt' => t('error'), 'title' => t('error')));
         break;
       case UPDATE_NOT_CHECKED:
       case UPDATE_NOT_CURRENT:
       default:
         $class = 'warning';
-        $icon = theme('image', array('path' => 'misc/watchdog-warning.png', 'alt' => t('warning'), 'title' => t('warning')));
+        $icon = theme('image', array('path' => 'misc/watchdog-warning.png', 'width' => 18, 'height' => 18, 'alt' => t('warning'), 'title' => t('warning')));
         break;
     }
 
diff --git a/themes/seven/template.php b/themes/seven/template.php
index 5be459bea6f9ea0e75904d4efad4d984bbfb93a3..4582749b1d0a29dd98db48f0a8625b965a1036a1 100644
--- a/themes/seven/template.php
+++ b/themes/seven/template.php
@@ -88,10 +88,10 @@ function seven_tablesort_indicator($variables) {
   $style = $variables['style'];
   $theme_path = drupal_get_path('theme', 'seven');
   if ($style == 'asc') {
-    return theme('image', array('path' => $theme_path . '/images/arrow-asc.png', 'alt' => t('sort ascending'), 'title' => t('sort ascending')));
+    return theme('image', array('path' => $theme_path . '/images/arrow-asc.png', 'alt' => t('sort ascending'), 'width' => 13, 'height' => 13, 'title' => t('sort ascending')));
   }
   else {
-    return theme('image', array('path' => $theme_path . '/images/arrow-desc.png', 'alt' => t('sort descending'), 'title' => t('sort descending')));
+    return theme('image', array('path' => $theme_path . '/images/arrow-desc.png', 'alt' => t('sort descending'), 'width' => 13, 'height' => 13, 'title' => t('sort descending')));
   }
 }
 
-- 
1.7.1

