| 212 | } |
| 213 | |
| 214 | public getBitmapWithRasterFormat (rasterFormat: number, raster: Uint8Array, width: number, height: number): Uint8Array { |
| 215 | switch (rasterFormat) { |
| 216 | case RasterFormat.RASTER_1555: |
| 217 | return ImageDecoder.bgra1555(raster, width, height); |
| 218 | case RasterFormat.RASTER_565: |
| 219 | return ImageDecoder.bgra565(raster, width, height); |
| 220 | case RasterFormat.RASTER_4444: |
| 221 | return ImageDecoder.bgra4444(raster, width, height); |
| 222 | case RasterFormat.RASTER_LUM: |
| 223 | return ImageDecoder.lum8(raster, width, height); |
| 224 | case RasterFormat.RASTER_8888: |
| 225 | return ImageDecoder.bgra8888(raster, width, height); |
| 226 | case RasterFormat.RASTER_888: |
| 227 | return ImageDecoder.bgra888(raster, width, height); |
| 228 | case RasterFormat.RASTER_555: |
| 229 | return ImageDecoder.bgra555(raster, width, height); |
| 230 | default: |
| 231 | return new Uint8Array(0); |
| 232 | } |
| 233 | } |
| 234 | } |