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

Legend:

Unmodified
Added
Removed
  • ImageMagick/trunk/coders/jpeg.c

    r7023 r7024  
    160160    height; 
    161161 
     162  double 
     163    divisor; 
     164 
    162165  unsigned int 
    163     divisor, 
    164166    *levels; 
    165167} QuantizationTable; 
     
    17161718      return(table); 
    17171719    } 
    1718   table->divisor=(unsigned int) StringToLong(attribute); 
    1719   if (table->divisor < 1) 
     1720  table->divisor=InterpretLocaleValue(attribute,(char **) NULL); 
     1721  if (table->divisor == 0.0) 
    17201722    { 
    17211723      (void) ThrowMagickException(exception,GetMagickModule(),OptionError, 
     
    17461748  for (i=0; i < (ssize_t) (table->width*table->height); i++) 
    17471749  { 
    1748     table->levels[i]=(unsigned int) (InterpretLocaleValue(content,&p)+0.5); 
    1749     if (table->divisor != 1) 
    1750       table->levels[i]/=table->divisor; 
     1750    table->levels[i]=(unsigned int) (InterpretLocaleValue(content,&p)/ 
     1751      table->divisor+0.5); 
    17511752    while (isspace((int) ((unsigned char) *p)) != 0) 
    17521753      p++; 
     
    17551756    content=p; 
    17561757  } 
    1757   for (j=i; i < 64; i++) 
    1758     table->levels[j]=table->levels[j-1]; 
    1759   value=(double) strtol(content,&p,10); 
     1758  value=InterpretLocaleValue(content,&p); 
    17601759  (void) value; 
    17611760  if (p != content) 
     
    17681767     return(table); 
    17691768   } 
     1769  for (j=i; j < 64; j++) 
     1770    table->levels[j]=table->levels[j-1]; 
    17701771  quantization_tables=DestroyXMLTree(quantization_tables); 
    17711772  xml=DestroyString(xml); 
Note: See TracChangeset for help on using the changeset viewer.