Changeset 7025
- Timestamp:
- 03/02/12 12:37:45 (15 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
ImageMagick/branches/ImageMagick-6.7.5/coders/jpeg.c
r7021 r7025 154 154 height; 155 155 156 double 157 divisor; 158 156 159 unsigned int 157 divisor,158 160 *levels; 159 161 } QuantizationTable; … … 1681 1683 return(table); 1682 1684 } 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) 1685 1687 { 1686 1688 (void) ThrowMagickException(exception,GetMagickModule(),OptionError, … … 1711 1713 for (i=0; i < (ssize_t) (table->width*table->height); i++) 1712 1714 { 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); 1716 1717 while (isspace((int) ((unsigned char) *p)) != 0) 1717 1718 p++; … … 1720 1721 content=p; 1721 1722 } 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); 1725 1724 (void) value; 1726 1725 if (p != content) … … 1733 1732 return(table); 1734 1733 } 1734 for (j=i; j < 64; j++) 1735 table->levels[j]=table->levels[j-1]; 1735 1736 quantization_tables=DestroyXMLTree(quantization_tables); 1736 1737 xml=DestroyString(xml);
Note: See TracChangeset
for help on using the changeset viewer.
