-
public class WriteFile
-
-
Method Summary
Modifier and Type Method Description static Array<byte>writeBytes8(Pix pixs)Write an 8bpp Pix to a flat byte array. static intwriteBytes8(Pix pixs, Array<byte> data)Write an 8bpp Pix to a flat byte array. static booleanwriteImpliedFormat(Pix pixs, File file, int quality, boolean progressive)Writes a Pix to file using the file extension as the output format;supported formats are .bmp, .jpg, and .png. static booleanwriteImpliedFormat(Pix pixs, File file)Writes a Pix to file using the file extension as the output format;supported formats are .bmp, .jpg, and .png.Jpeg files will have quality 75 and will be not progressive. static BitmapwriteBitmap(Pix pixs)Writes a Pix to an Android Bitmap object. -
-
Method Detail
-
writeBytes8
static Array<byte> writeBytes8(Pix pixs)
Write an 8bpp Pix to a flat byte array.
- Parameters:
pixs- The 8bpp source image.
-
writeBytes8
static int writeBytes8(Pix pixs, Array<byte> data)
Write an 8bpp Pix to a flat byte array.
- Parameters:
pixs- The 8bpp source image.data- A byte array large enough to hold the pixels of pixs.
-
writeImpliedFormat
static boolean writeImpliedFormat(Pix pixs, File file, int quality, boolean progressive)
Writes a Pix to file using the file extension as the output format;supported formats are .bmp, .jpg, and .png.
Notes:
- This determines the output format from the filename extension.
- The last two args are ignored except for requests for jpeg files.
- The jpeg default quality is 75.
- Parameters:
pixs- Source image.file- The file to write.quality- Compression quality (between 1 - 100, 0 = default).progressive- Progressive format.
-
writeImpliedFormat
static boolean writeImpliedFormat(Pix pixs, File file)
Writes a Pix to file using the file extension as the output format;supported formats are .bmp, .jpg, and .png.Jpeg files will have quality 75 and will be not progressive.
- Parameters:
pixs- Source image.file- The file to write.
-
writeBitmap
static Bitmap writeBitmap(Pix pixs)
Writes a Pix to an Android Bitmap object. The output Bitmap will alwaysbe in ARGB_8888 format, but the input Pixs may be any bit-depth.
- Parameters:
pixs- The source image.
-
-
-
-