Changeset 7024 for ImageMagick/trunk/coders/jpeg.c
- Timestamp:
- 03/02/12 12:37:28 (16 months ago)
- File:
-
- 1 edited
-
ImageMagick/trunk/coders/jpeg.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
ImageMagick/trunk/coders/jpeg.c
r7023 r7024 160 160 height; 161 161 162 double 163 divisor; 164 162 165 unsigned int 163 divisor,164 166 *levels; 165 167 } QuantizationTable; … … 1716 1718 return(table); 1717 1719 } 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) 1720 1722 { 1721 1723 (void) ThrowMagickException(exception,GetMagickModule(),OptionError, … … 1746 1748 for (i=0; i < (ssize_t) (table->width*table->height); i++) 1747 1749 { 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); 1751 1752 while (isspace((int) ((unsigned char) *p)) != 0) 1752 1753 p++; … … 1755 1756 content=p; 1756 1757 } 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); 1760 1759 (void) value; 1761 1760 if (p != content) … … 1768 1767 return(table); 1769 1768 } 1769 for (j=i; j < 64; j++) 1770 table->levels[j]=table->levels[j-1]; 1770 1771 quantization_tables=DestroyXMLTree(quantization_tables); 1771 1772 xml=DestroyString(xml);
Note: See TracChangeset
for help on using the changeset viewer.
