Package com.banuba.sdk.types
Class FullImageData
java.lang.Object
com.banuba.sdk.types.FullImageData
Container for image data designed for Banuba SDK.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Describes various information related to image orientation. -
Constructor Summary
ConstructorsConstructorDescriptionFullImageData
(android.graphics.Bitmap image, FullImageData.Orientation orientation) A parametrized constructor for creating FullImageData instance from bitmap (@p image) and @p orientation.FullImageData
(android.media.Image image, FullImageData.Orientation orientation) A parametrized constructor for creating FullImageData instance from @p image with @p orientation.FullImageData
(android.media.Image image, FullImageData.Orientation orientation, ImageReleaser ir) A parametrized constructor for creating FullImageData instance from @p image with @p orientation and @p ir.FullImageData
(android.media.Image image, FullImageData.Orientation orientation, ImageReleaser ir, ColorRange colorRange, ColorStd colorStd) A parametrized constructor for creating FullImageData instance from @p image with @p orientation, @p ir, @p colorRange and @p colorStd.FullImageData
(android.util.Size size, Buffer plane0, Buffer plane1, Buffer plane2, int rowStride0, int rowStride1, int rowStride2, int pixelStride0, int pixelStride1, int pixelStride2, FullImageData.Orientation orientation) A parametrized constructor for creating FullImageData instance from raw image information.FullImageData
(android.util.Size size, Buffer plane0, Buffer plane1, Buffer plane2, int rowStride0, int rowStride1, int rowStride2, int pixelStride0, int pixelStride1, int pixelStride2, FullImageData.Orientation orientation, ImageReleaser ir) A parametrized constructor for creating FullImageData instance from raw image information.FullImageData
(android.util.Size size, Buffer plane0, Buffer plane1, Buffer plane2, int rowStride0, int rowStride1, int rowStride2, int pixelStride0, int pixelStride1, int pixelStride2, FullImageData.Orientation orientation, ImageReleaser ir, ColorRange colorRange, ColorStd colorStd) A parametrized constructor for creating FullImageData instance from raw image information.FullImageData
(Buffer image, android.util.Size size, int rowStride, FullImageData.Orientation orientation) A parametrized constructor for creating FullImageData instance from raw image information. -
Method Summary
Modifier and TypeMethodDescriptionint
android.util.Size
getSize()
void
Sets the image releaser for image (@see ImageReleaser).
-
Constructor Details
-
FullImageData
A parametrized constructor for creating FullImageData instance from @p image with @p orientation.- Parameters:
image
- is a single complete image buffer(@see android.media.Image).orientation
- is the inner representation of orientation of FullImageData (@see Orientation)
-
FullImageData
public FullImageData(android.media.Image image, FullImageData.Orientation orientation, ImageReleaser ir) A parametrized constructor for creating FullImageData instance from @p image with @p orientation and @p ir.- Parameters:
image
- is a single complete image buffer(@see android.media.Image).orientation
- is the inner representation of orientation of FullImageData (@see Orientation).ir
- is an image releaser(@see ImageReleaser) which is responsible for correct closing of image.
-
FullImageData
public FullImageData(android.media.Image image, FullImageData.Orientation orientation, ImageReleaser ir, ColorRange colorRange, ColorStd colorStd) A parametrized constructor for creating FullImageData instance from @p image with @p orientation, @p ir, @p colorRange and @p colorStd.- Parameters:
image
- is a single complete image buffer(@see android.media.Image).orientation
- is the inner representation of orientation of FullImageData (@see Orientation).ir
- is an image releaser(@see ImageReleaser) which is responsible for correct closing of image.colorRange
- is an enum value of color range (@see ColorRange).colorStd
- is an enum value of ColorStd(@see ColorStd) which is responsible for color standard.
-
FullImageData
public FullImageData(android.util.Size size, Buffer plane0, Buffer plane1, Buffer plane2, int rowStride0, int rowStride1, int rowStride2, int pixelStride0, int pixelStride1, int pixelStride2, FullImageData.Orientation orientation) A parametrized constructor for creating FullImageData instance from raw image information. Accepts both planar and biplanar (`plane2 = null`) YUV420 images.- Parameters:
size
- is a width and height of video in pixels (@see android.utils.Size).plane0
- is a buffer with data for a single image plane.plane1
- is a buffer with data for a single image plane.plane2
- is a buffer with data for a single image plane.rowStride0
- is a distance in bytes from the first value of one row of the @p plane0 to the first value of the next row.rowStride1
- is a distance in bytes from the first value of one row of the @p plane1 to the first value of the next row.rowStride2
- is a distance in bytes from the first value of one row of the @p plane2 to the first value of the next row.pixelStride0
- is a distance in bytes from the color channel of one pixel to the next for the @p plane0.pixelStride1
- is a distance in bytes from the color channel of one pixel to the next for the @p plane1.pixelStride2
- is a distance in bytes from the color channel of one pixel to the next for the @p plane2.orientation
- is the inner representation of orientation of FullImageData (@see Orientation).
-
FullImageData
public FullImageData(android.util.Size size, Buffer plane0, Buffer plane1, Buffer plane2, int rowStride0, int rowStride1, int rowStride2, int pixelStride0, int pixelStride1, int pixelStride2, FullImageData.Orientation orientation, ImageReleaser ir) A parametrized constructor for creating FullImageData instance from raw image information. Accepts both planar and biplanar (`plane2 = null`) YUV420 images.- Parameters:
size
- is a width and height of video in pixels (@see android.utils.Size).plane0
- is a buffer with data for a single image plane.plane1
- is a buffer with data for a single image plane.plane2
- is a buffer with data for a single image plane.rowStride0
- is a distance in bytes from the first value of one row of the @p plane0 to the first value of the next row.rowStride1
- is a distance in bytes from the first value of one row of the @p plane1 to the first value of the next row.rowStride2
- is a distance in bytes from the first value of one row of the @p plane2 to the first value of the next row.pixelStride0
- is a distance in bytes from the color channel of one pixel to the next for the @p plane0.pixelStride1
- is a distance in bytes from the color channel of one pixel to the next for the @p plane1.pixelStride2
- is a distance in bytes from the color channel of one pixel to the next for the @p plane2.orientation
- is the inner representation of orientation of FullImageData (@see Orientation).ir
- is an image releaser(@see ImageReleaser) which is responsible for correct closing of image.
-
FullImageData
public FullImageData(android.util.Size size, Buffer plane0, Buffer plane1, Buffer plane2, int rowStride0, int rowStride1, int rowStride2, int pixelStride0, int pixelStride1, int pixelStride2, FullImageData.Orientation orientation, ImageReleaser ir, ColorRange colorRange, ColorStd colorStd) A parametrized constructor for creating FullImageData instance from raw image information. Accepts both planar and biplanar (`plane2 = null`) YUV420 images.- Parameters:
size
- is a width and height of video in pixels (@see android.utils.Size).plane0
- is a buffer with data for a single image plane.plane1
- is a buffer with data for a single image plane.plane2
- is a buffer with data for a single image plane.rowStride0
- is a distance in bytes from the first value of one row of the @p plane0 to the first value of the next row.rowStride1
- is a distance in bytes from the first value of one row of the @p plane1 to the first value of the next row.rowStride2
- is a distance in bytes from the first value of one row of the @p plane2 to the first value of the next row.pixelStride0
- is a distance in bytes from the color channel of one pixel to the next for the @p plane0.pixelStride1
- is a distance in bytes from the color channel of one pixel to the next for the @p plane1.pixelStride2
- is a distance in bytes from the color channel of one pixel to the next for the @p plane2.orientation
- is the inner representation of orientation of FullImageData (@see Orientation).ir
- is an image releaser(@see ImageReleaser) which is responsible for correct closing of image.colorRange
- is an enum value of color range (@see ColorRange).colorStd
- is an enum value of ColorStd(@see ColorStd) which is responsible for color standard.
-
FullImageData
A parametrized constructor for creating FullImageData instance from bitmap (@p image) and @p orientation.- Parameters:
image
- is a bitmap (@see android.graphics.Bitmap), must beARGB_8888
.orientation
- is the inner representation of orientation of FullImageData (@see Orientation).
-
FullImageData
public FullImageData(Buffer image, android.util.Size size, int rowStride, FullImageData.Orientation orientation) A parametrized constructor for creating FullImageData instance from raw image information.- Parameters:
image
- is a pixel layout. Is identical to `Bitmap.Config.ARGB_8888`.size
- is a width and height of video in pixels (@see android.utils.Size).rowStride
- is a distance in bytes from the first value of one row of the @p image to the first value of the next row.orientation
- is the inner representation of orientation of FullImageData (@see Orientation).
-
-
Method Details
-
setImageReleaser
Sets the image releaser for image (@see ImageReleaser). -
getSize
public android.util.Size getSize()- Returns:
- Returns the size of the image, i.e. its width and height
-
getOrientation
- Returns:
- Returns the orientation of the image.
-
getPixelFormat
public int getPixelFormat()- Returns:
- Returns the image pixel format.
-
getColorRange
- Returns:
- Returns the image color range.
-
getColorStd
- Returns:
- Returns the image color standard.
-