Package fr.olleroy.ImageModifier
Class BMPFile
java.lang.Object
fr.olleroy.ImageModifier.BMPFile
Represent a bmp file.
- Version:
- 1.2.0
- Author:
- olleroy alias ollprogram.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
BMPFile
Construct a BMPFile from a file or a URL.- Parameters:
imagePathnameOrURL
- The pathname or the URL of the image.- Throws:
IOException
- If it can't access or read the File.
-
BMPFile
Construct a BMPFile with a new Bitmap built with the specified Bitmap- Parameters:
bitmap
- The bitmap for the bmp file.
-
-
Method Details
-
getImage
Get the Image.- Returns:
- The image from the BMPFile.
-
save
Write the image file as a bmp file with the Windows DIB BITMAPINFOHEADER to the specified pathname. The image can be 24bpp or 32bpp (bit per pixel). 24bpp is recommended for large scaled images.- Parameters:
pathname
- The pathname. Where you want to save.alpha
-true
for 32 bpp (ARGB), else 24bpp (RGB).- Throws:
IOException
- Tf an I/O error occurs.
-
getBitmap
Get the bitmap.- Returns:
- the bitmap from the BMPFile.
-