Package io.anyline2.image
Class AnylineImage
-
- All Implemented Interfaces:
public class AnylineImage
-
-
Field Summary
Fields Modifier and Type Field Description public AnylineImage
coreImage
-
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 AnylineImage
getCoreImage()
void
rotate(int degrees)
Array<byte>
getData()
int
getWidth()
int
getHeight()
Bitmap
getBitmap()
Retrieves the Bitmap of the AnylineImage. AnylineImage
copy()
String
save()
Saves an AnylineImage to storage. AnylineImage
crop(CropRect cropRect)
AnylineImage.ColorFormat
getColorFormat()
synchronized void
release()
-
-
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()
-
-
-
-