comparison dwt/internal/image/JPEGRestartInterval.d @ 34:5123b17c98ef

Ported dwt.events.*, dwt.graphics.GC, Region, dwt.internal.image.*
author Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
date Sun, 14 Sep 2008 01:45:57 +0200
parents 1a8b3cb347e0
children
comparison
equal deleted inserted replaced
33:965ac0a77267 34:5123b17c98ef
5 * which accompanies this distribution, and is available at 5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/epl-v10.html 6 * http://www.eclipse.org/legal/epl-v10.html
7 * 7 *
8 * Contributors: 8 * Contributors:
9 * IBM Corporation - initial API and implementation 9 * IBM Corporation - initial API and implementation
10 * Port to the D programming language:
11 * Frank Benoit <benoit@tionex.de>
10 *******************************************************************************/ 12 *******************************************************************************/
11 module dwt.internal.image; 13 module dwt.internal.image.JPEGRestartInterval;
12 14
15 import dwt.internal.image.JPEGFixedSizeSegment;
16 import dwt.internal.image.LEDataInputStream;
17 import dwt.internal.image.JPEGFileFormat;
13 18
14 final class JPEGRestartInterval : JPEGFixedSizeSegment { 19 final class JPEGRestartInterval : JPEGFixedSizeSegment {
15 20
16 public this(LEDataInputStream byteStream) { 21 public this(LEDataInputStream byteStream) {
17 super(byteStream); 22 super(byteStream);
18 } 23 }
19 24
20 public int signature() { 25 public override int signature() {
21 return JPEGFileFormat.DRI; 26 return JPEGFileFormat.DRI;
22 } 27 }
23 28
24 public int getRestartInterval() { 29 public int getRestartInterval() {
25 return ((reference[4] & 0xFF) << 8 | (reference[5] & 0xFF)); 30 return ((reference[4] & 0xFF) << 8 | (reference[5] & 0xFF));
26 } 31 }
27 32
28 public int fixedSize() { 33 public override int fixedSize() {
29 return 6; 34 return 6;
30 } 35 }
31 } 36 }