How to output ImageData as a BMP image in Java?
I used this code:
ImageLoader imageLoader = new ImageLoader();
imageLoader.save("output.bmp", ImageLoader.TYPE_BMP, new ImageData[]{imageData});
But ImageLoader.TYPE_BMP eported an error stating that the TYPE_BMP could not be found.
May I ask what I should do?
SWT's
ImageLoaderdoes not support saving images in BMP format directly, so if you need to save an image in BMP, you can use Java's built-inImageIOclass, like: