Репозиторий ALT Linux backports/2.4
Последнее обновление: 9 июля 2008 | Пакетов: 497 | Посещений: 1488484
 поиск   регистрация   авторизация 
 
Группа :: Графика
Пакет: netpbm

 Главная   Изменения   Спек   Патчи   Загрузить   Bugs and FR 

Патч: netpbm-10.23-pngtopnm.patch


--- netpbm-10.23/converter/other/pngtopnm.c.pngtopnm	2004-08-05 10:48:22.000000000 +0200
+++ netpbm-10.23/converter/other/pngtopnm.c	2004-08-05 12:44:31.179933480 +0200
@@ -887,11 +887,12 @@
     }
   }
 
-  if ((pnm_type == PGM_TYPE) && (maxval > PGM_OVERALLMAXVAL))
-    maxmaxval = PGM_OVERALLMAXVAL;
-  else if ((pnm_type == PPM_TYPE) && (maxval > PPM_OVERALLMAXVAL))
-    maxmaxval = PPM_OVERALLMAXVAL;
-  else maxmaxval = maxval;
+  /*
+   * The conditions maxval > [PGM,PPM]_OVERALL removed because
+   * [PGM,PPM]_OVERALL == 0xffff and maxval is png_uint_16, so
+   * the condition can never be true.
+   */
+  maxmaxval = maxval;
 
   writePnm(stdout, maxval, pnm_type, info_ptr, png_image);
 
 
design & coding: Vladimir Lettiev aka crux © 2004-2005