Package io.anyline2.image
Class AnylineImage
-
- All Implemented Interfaces:
public class AnylineImage
-
-
Field Summary
Fields Modifier and Type Field Description public AnylineImagecoreImage
-
Constructor Summary
Constructors Constructor Description AnylineImage(Array<byte> data, AnylineImage.ColorFormat colorFormat, int width, int height, int bytesPerRow)Instantiates a new AnylineImage from a byte array with a given width and height. AnylineImage(Array<byte> data, int width, int height)Instantiates a new AnylineImage from a byte array with a given width and height. AnylineImage(Bitmap bitmap)Instantiates an AnylineImage from a Bitmap.
-
Method Summary
Modifier and Type Method Description AnylineImagegetCoreImage()voidrotate(int degrees)Array<byte>getData()intgetWidth()intgetHeight()BitmapgetBitmap()Retrieves the Bitmap of the AnylineImage. AnylineImagecopy()Stringsave()Saves an AnylineImage to storage. AnylineImagecrop(CropRect cropRect)AnylineImage.ColorFormatgetColorFormat()synchronized voidrelease()-
-
Constructor Detail
-
AnylineImage
AnylineImage(Array<byte> data, AnylineImage.ColorFormat colorFormat, int width, int height, int bytesPerRow)
Instantiates a new AnylineImage from a byte array with a given width and height.- Parameters:
data- byte representation of the imagecolorFormat- colorFormat of imagewidth- image widthheight- image height
-
AnylineImage
AnylineImage(Array<byte> data, int width, int height)
Instantiates a new AnylineImage from a byte array with a given width and height.- Parameters:
data- byte representation of the imagewidth- image widthheight- image height
-
AnylineImage
AnylineImage(Bitmap bitmap)
Instantiates an AnylineImage from a Bitmap.- Parameters:
bitmap- the image source in Bitmap format
-
-
Method Detail
-
getCoreImage
AnylineImage getCoreImage()
-
rotate
void rotate(int degrees)
-
getWidth
int getWidth()
-
getHeight
int getHeight()
-
getBitmap
Bitmap getBitmap()
Retrieves the Bitmap of the AnylineImage.
-
copy
@NonNull() AnylineImage copy()
-
save
String save()
Saves an AnylineImage to storage.
- Returns:
path to the AnylineImage
-
crop
AnylineImage crop(CropRect cropRect)
-
getColorFormat
AnylineImage.ColorFormat getColorFormat()
-
release
synchronized void release()
-
-
-
-