Package com.journeyapps.barcodescanner
Class RawImageData
- java.lang.Object
-
- com.journeyapps.barcodescanner.RawImageData
-
public class RawImageData extends Object
-
-
Constructor Summary
Constructors Constructor Description RawImageData(byte[] data, int width, int height)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description RawImageDatacropAndScale(Rect cropRect, int scale)byte[]getData()intgetHeight()intgetWidth()static byte[]rotate180(byte[] data, int imageWidth, int imageHeight)Rotate an image by 180 degrees.RawImageDatarotateCameraPreview(int cameraRotation)static byte[]rotateCCW(byte[] data, int imageWidth, int imageHeight)Rotate an image by 90 degrees CCW.static byte[]rotateCW(byte[] data, int imageWidth, int imageHeight)Rotate an image by 90 degrees CW.
-
-
-
Method Detail
-
getData
public byte[] getData()
-
getWidth
public int getWidth()
-
getHeight
public int getHeight()
-
cropAndScale
public RawImageData cropAndScale(Rect cropRect, int scale)
-
rotateCameraPreview
public RawImageData rotateCameraPreview(int cameraRotation)
-
rotateCW
public static byte[] rotateCW(byte[] data, int imageWidth, int imageHeight)Rotate an image by 90 degrees CW.- Parameters:
data- the image data, in with the first width * height bytes being the luminance data.imageWidth- the width of the imageimageHeight- the height of the image- Returns:
- the rotated bytes
-
rotate180
public static byte[] rotate180(byte[] data, int imageWidth, int imageHeight)Rotate an image by 180 degrees.- Parameters:
data- the image data, in with the first width * height bytes being the luminance data.imageWidth- the width of the imageimageHeight- the height of the image- Returns:
- the rotated bytes
-
rotateCCW
public static byte[] rotateCCW(byte[] data, int imageWidth, int imageHeight)Rotate an image by 90 degrees CCW.- Parameters:
data- the image data, in with the first width * height bytes being the luminance data.imageWidth- the width of the imageimageHeight- the height of the image- Returns:
- the rotated bytes
-
-