comparison dwt/internal/image/PngPlteChunk.d @ 48:9a64a7781bab

Added override and alias, first chunk. Thanks torhu for doing this patch.
author Frank Benoit <benoit@tionex.de>
date Sun, 03 Feb 2008 01:14:54 +0100
parents 57151e2793a2
children ab60f3309436
comparison
equal deleted inserted replaced
47:6940f8be58ba 48:9a64a7781bab
37 this(byte[] reference){ 37 this(byte[] reference){
38 super(reference); 38 super(reference);
39 paletteSize = length / 3; 39 paletteSize = length / 3;
40 } 40 }
41 41
42 int getChunkType() { 42 override int getChunkType() {
43 return CHUNK_PLTE; 43 return CHUNK_PLTE;
44 } 44 }
45 45
46 /** 46 /**
47 * Get the number of colors in this palette. 47 * Get the number of colors in this palette.
85 } 85 }
86 86
87 /** 87 /**
88 * Answer whether the chunk is a valid PLTE chunk. 88 * Answer whether the chunk is a valid PLTE chunk.
89 */ 89 */
90 void validate(PngFileReadState readState, PngIhdrChunk headerChunk) { 90 override void validate(PngFileReadState readState, PngIhdrChunk headerChunk) {
91 // A PLTE chunk is invalid if no IHDR has been read or if any PLTE, 91 // A PLTE chunk is invalid if no IHDR has been read or if any PLTE,
92 // IDAT, or IEND chunk has been read. 92 // IDAT, or IEND chunk has been read.
93 if (!readState.readIHDR 93 if (!readState.readIHDR
94 || readState.readPLTE 94 || readState.readPLTE
95 || readState.readTRNS 95 || readState.readTRNS