videoFormats = new VideoFormat[sizes.length * 2]; // For RGB16/24
for (int i = 0; i < sizes.length; i++) {
Dimension size = sizes[i];
videoFormats[i] =
new RGBFormat(size,
size.width * size.height * 3,
Format.byteArray,
Format.NOT_SPECIFIED,
24,
3, 2, 1,
3, size.width * 3,
RGBFormat.TRUE,
Format.NOT_SPECIFIED);
videoFormats[i+sizes.length] =
new RGBFormat(size,
size.width * size.height * 2,
Format.byteArray,
Format.NOT_SPECIFIED,
16,
0x7C00, 0x03E0, 0x001F,
2, size.width * 2,
RGBFormat.TRUE,
RGBFormat.LITTLE_ENDIAN);
}