Changeset 314:0e2b4fed7a0f for dwt/internal/image
- Timestamp:
- 10/07/08 08:44:44 (3 months ago)
- Files:
-
- dwt/internal/image/JPEGDecoder.d (modified) (4 diffs)
- dwt/internal/image/PNGFileFormat.d (modified) (1 diff)
- dwt/internal/image/PngPlteChunk.d (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
dwt/internal/image/JPEGDecoder.d
r246 r314 980 980 s &= 15; 981 981 if (s !is 0) { 982 if (s !is 1) { /* size of new coef should always be 1 */982 if (s !is 1) { /* size of new coef should always be 1 */ 983 983 // WARNMS(cinfo, JWRN_HUFF_BAD_CODE); 984 984 } … … 1243 1243 } else { /* EOBr, run length is 2^r + appended bits */ 1244 1244 EOBRUN = 1 << r; 1245 if (r !is 0) { /* EOBr, r > 0 */1245 if (r !is 0) { /* EOBr, r > 0 */ 1246 1246 // CHECK_BIT_BUFFER(br_state, r, return FALSE); 1247 1247 { … … 4449 4449 length -= count; 4450 4450 4451 if ((index & 0x10) !is 0) { /* AC table definition */4451 if ((index & 0x10) !is 0) { /* AC table definition */ 4452 4452 index -= 0x10; 4453 4453 htblptr = cinfo.ac_huff_tbl_ptrs[index] = new JHUFF_TBL(); … … 5238 5238 } 5239 5239 totallen -= APP0_DATA_LEN; 5240 if (totallen !is ((data[12] & 0xFF) * (data[13] & 0xFF) * 3)) {5240 if (totallen !is ((data[12] & 0xFF) * (data[13] & 0xFF) * 3)) { 5241 5241 // TRACEMS1(cinfo, 1, JTRC_JFIF_BADTHUMBNAILSIZE, cast(int) totallen); 5242 5242 } dwt/internal/image/PNGFileFormat.d
r246 r314 177 177 if ((signature[5] & 0xFF) !is 10) return false; //<LINEFEED> 178 178 if ((signature[6] & 0xFF) !is 26) return false; //<CTRL/Z> 179 if ((signature[7] & 0xFF) !is 10) return false; //<LINEFEED> 179 if ((signature[7] & 0xFF) !is 10) return false; //<LINEFEED> 180 180 return true; 181 181 } catch (Exception e) { dwt/internal/image/PngPlteChunk.d
r213 r314 113 113 // Palette chunks' data fields must be event multiples 114 114 // of 3. Each 3-byte group represents an RGB value. 115 if (getLength() % 3 !is 0) DWT.error(DWT.ERROR_INVALID_IMAGE); 115 if (getLength() % 3 !is 0) DWT.error(DWT.ERROR_INVALID_IMAGE); 116 116 117 117 // Palettes cannot have more entries than 2^bitDepth
