Mercurial > projects > dwt-linux
comparison dwt/internal/image/PNGFileFormat.d @ 240:ce446666f5a2
Update to SWT 3.4M7
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Mon, 12 May 2008 19:13:01 +0200 |
parents | 08789b28bdf3 |
children | c0d810de7093 |
comparison
equal
deleted
inserted
replaced
239:06a1f6829310 | 240:ce446666f5a2 |
---|---|
174 if ((signature[2] & 0xFF) !is 78) return false; //N | 174 if ((signature[2] & 0xFF) !is 78) return false; //N |
175 if ((signature[3] & 0xFF) !is 71) return false; //G | 175 if ((signature[3] & 0xFF) !is 71) return false; //G |
176 if ((signature[4] & 0xFF) !is 13) return false; //<RETURN> | 176 if ((signature[4] & 0xFF) !is 13) return false; //<RETURN> |
177 if ((signature[5] & 0xFF) !is 10) return false; //<LINEFEED> | 177 if ((signature[5] & 0xFF) !is 10) return false; //<LINEFEED> |
178 if ((signature[6] & 0xFF) !is 26) return false; //<CTRL/Z> | 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 return true; | 180 return true; |
181 } catch (Exception e) { | 181 } catch (Exception e) { |
182 return false; | 182 return false; |
183 } | 183 } |
184 } | 184 } |
312 //TEMPORARY CODE | 312 //TEMPORARY CODE |
313 //PORTING_FIXME | 313 //PORTING_FIXME |
314 bool use3_2 = true;//System.getProperty("dwt.internal.image.PNGFileFormat_3.2") !is null; | 314 bool use3_2 = true;//System.getProperty("dwt.internal.image.PNGFileFormat_3.2") !is null; |
315 InputStream inflaterStream = use3_2 ? null : Compatibility.newInflaterInputStream(stream); | 315 InputStream inflaterStream = use3_2 ? null : Compatibility.newInflaterInputStream(stream); |
316 if (inflaterStream !is null) { | 316 if (inflaterStream !is null) { |
317 stream = new BufferedInputStream(inflaterStream); | 317 stream = inflaterStream; |
318 } else { | 318 } else { |
319 stream = new PngDecodingDataStream(stream); | 319 stream = new PngDecodingDataStream(stream); |
320 } | 320 } |
321 int interlaceMethod = headerChunk.getInterlaceMethod(); | 321 int interlaceMethod = headerChunk.getInterlaceMethod(); |
322 if (interlaceMethod is PngIhdrChunk.INTERLACE_METHOD_NONE) { | 322 if (interlaceMethod is PngIhdrChunk.INTERLACE_METHOD_NONE) { |