# HG changeset patch # User Frank Benoit # Date 1223383484 -7200 # Node ID 0e2b4fed7a0f539300dee6844d72b7747d76e3be # Parent fcbee1f66cc3a4f9c423ee208f6e5ccb12a18221 sync dwt/internal/image with dwt-linux diff -r fcbee1f66cc3 -r 0e2b4fed7a0f dwt/internal/image/JPEGDecoder.d --- a/dwt/internal/image/JPEGDecoder.d Fri Sep 19 22:43:25 2008 +0200 +++ b/dwt/internal/image/JPEGDecoder.d Tue Oct 07 14:44:44 2008 +0200 @@ -979,7 +979,7 @@ r = s >> 4; s &= 15; if (s !is 0) { - if (s !is 1) { /* size of new coef should always be 1 */ + if (s !is 1) { /* size of new coef should always be 1 */ // WARNMS(cinfo, JWRN_HUFF_BAD_CODE); } // CHECK_BIT_BUFFER(br_state, 1, goto undoit); @@ -1242,7 +1242,7 @@ k += 15; /* skip 15 zeroes in band */ } else { /* EOBr, run length is 2^r + appended bits */ EOBRUN = 1 << r; - if (r !is 0) { /* EOBr, r > 0 */ + if (r !is 0) { /* EOBr, r > 0 */ // CHECK_BIT_BUFFER(br_state, r, return FALSE); { if (bits_left < (r)) { @@ -4448,7 +4448,7 @@ length -= count; - if ((index & 0x10) !is 0) { /* AC table definition */ + if ((index & 0x10) !is 0) { /* AC table definition */ index -= 0x10; htblptr = cinfo.ac_huff_tbl_ptrs[index] = new JHUFF_TBL(); } else { /* DC table definition */ @@ -5237,7 +5237,7 @@ // GETJOCTET(data[12]), GETJOCTET(data[13])); } totallen -= APP0_DATA_LEN; - if (totallen !is ((data[12] & 0xFF) * (data[13] & 0xFF) * 3)) { + if (totallen !is ((data[12] & 0xFF) * (data[13] & 0xFF) * 3)) { // TRACEMS1(cinfo, 1, JTRC_JFIF_BADTHUMBNAILSIZE, cast(int) totallen); } } else if (datalen >= 6 && diff -r fcbee1f66cc3 -r 0e2b4fed7a0f dwt/internal/image/PNGFileFormat.d --- a/dwt/internal/image/PNGFileFormat.d Fri Sep 19 22:43:25 2008 +0200 +++ b/dwt/internal/image/PNGFileFormat.d Tue Oct 07 14:44:44 2008 +0200 @@ -176,7 +176,7 @@ if ((signature[4] & 0xFF) !is 13) return false; // if ((signature[5] & 0xFF) !is 10) return false; // if ((signature[6] & 0xFF) !is 26) return false; // - if ((signature[7] & 0xFF) !is 10) return false; // + if ((signature[7] & 0xFF) !is 10) return false; // return true; } catch (Exception e) { return false; diff -r fcbee1f66cc3 -r 0e2b4fed7a0f dwt/internal/image/PngPlteChunk.d --- a/dwt/internal/image/PngPlteChunk.d Fri Sep 19 22:43:25 2008 +0200 +++ b/dwt/internal/image/PngPlteChunk.d Tue Oct 07 14:44:44 2008 +0200 @@ -112,7 +112,7 @@ // Palette chunks' data fields must be event multiples // of 3. Each 3-byte group represents an RGB value. - if (getLength() % 3 !is 0) DWT.error(DWT.ERROR_INVALID_IMAGE); + if (getLength() % 3 !is 0) DWT.error(DWT.ERROR_INVALID_IMAGE); // Palettes cannot have more entries than 2^bitDepth // where bitDepth is the bit depth of the image given