Changeset 7025


Ignore:
Timestamp:
03/02/12 12:37:45 (15 months ago)
Author:
cristy
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • ImageMagick/branches/ImageMagick-6.7.5/coders/jpeg.c

    r7021 r7025  
    154154    height; 
    155155 
     156  double 
     157    divisor; 
     158 
    156159  unsigned int 
    157     divisor, 
    158160    *levels; 
    159161} QuantizationTable; 
     
    16811683      return(table); 
    16821684    } 
    1683   table->divisor=(unsigned int) StringToLong(attribute); 
    1684   if (table->divisor < 1) 
     1685  table->divisor=InterpretLocaleValue(attribute,(char **) NULL); 
     1686  if (table->divisor == 0.0) 
    16851687    { 
    16861688      (void) ThrowMagickException(exception,GetMagickModule(),OptionError, 
     
    17111713  for (i=0; i < (ssize_t) (table->width*table->height); i++) 
    17121714  { 
    1713     table->levels[i]=(unsigned int) (InterpretLocaleValue(content,&p)+0.5); 
    1714     if (table->divisor != 1) 
    1715       table->levels[i]/=table->divisor; 
     1715    table->levels[i]=(unsigned int) (InterpretLocaleValue(content,&p)/ 
     1716      table->divisor+0.5); 
    17161717    while (isspace((int) ((unsigned char) *p)) != 0) 
    17171718      p++; 
     
    17201721    content=p; 
    17211722  } 
    1722   for (j=i; i < 64; i++) 
    1723     table->levels[j]=table->levels[j-1]; 
    1724   value=(double) strtol(content,&p,10); 
     1723  value=InterpretLocaleValue(content,&p); 
    17251724  (void) value; 
    17261725  if (p != content) 
     
    17331732     return(table); 
    17341733   } 
     1734  for (j=i; j < 64; j++) 
     1735    table->levels[j]=table->levels[j-1]; 
    17351736  quantization_tables=DestroyXMLTree(quantization_tables); 
    17361737  xml=DestroyString(xml); 
Note: See TracChangeset for help on using the changeset viewer.