Mercurial > projects > dwt-mac
comparison dwt/internal/image/JPEGScanHeader.d @ 7:e831403a80a9
Add 'cast' to casts
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Wed, 27 Aug 2008 14:30:35 +0200 |
parents | 1a8b3cb347e0 |
children | 5123b17c98ef |
comparison
equal
deleted
inserted
replaced
6:b903c16b6f48 | 7:e831403a80a9 |
---|---|
71 DWT.error(DWT.ERROR_INVALID_IMAGE); | 71 DWT.error(DWT.ERROR_INVALID_IMAGE); |
72 } | 72 } |
73 for (int i = 0; i < compCount; i++) { | 73 for (int i = 0; i < compCount; i++) { |
74 int ofs = i * 2 + 5; | 74 int ofs = i * 2 + 5; |
75 int[] compParams = compSpecParams[i]; | 75 int[] compParams = compSpecParams[i]; |
76 reference[ofs] = (byte)(i + 1); | 76 reference[ofs] = cast(byte)(i + 1); |
77 reference[ofs + 1] = (byte)(compParams[0] * 16 + compParams[1]); | 77 reference[ofs + 1] = cast(byte)(compParams[0] * 16 + compParams[1]); |
78 } | 78 } |
79 } | 79 } |
80 | 80 |
81 public void setEndOfSpectralSelection(int anInteger) { | 81 public void setEndOfSpectralSelection(int anInteger) { |
82 reference[(2 * getNumberOfImageComponents()) + 6] = (byte)anInteger; | 82 reference[(2 * getNumberOfImageComponents()) + 6] = cast(byte)anInteger; |
83 } | 83 } |
84 | 84 |
85 public void setNumberOfImageComponents(int anInteger) { | 85 public void setNumberOfImageComponents(int anInteger) { |
86 reference[4] = (byte)(anInteger & 0xFF); | 86 reference[4] = cast(byte)(anInteger & 0xFF); |
87 } | 87 } |
88 | 88 |
89 public void setStartOfSpectralSelection(int anInteger) { | 89 public void setStartOfSpectralSelection(int anInteger) { |
90 reference[(2 * getNumberOfImageComponents()) + 5] = (byte)anInteger; | 90 reference[(2 * getNumberOfImageComponents()) + 5] = cast(byte)anInteger; |
91 } | 91 } |
92 | 92 |
93 public int signature() { | 93 public int signature() { |
94 return JPEGFileFormat.SOS; | 94 return JPEGFileFormat.SOS; |
95 } | 95 } |