Class ImageUtils


  • public class ImageUtils
    extends java.lang.Object
    Created by pauldriegen on 2016-11-23.
    • Constructor Detail

      • ImageUtils

        public ImageUtils​(android.content.Context context)
    • Method Detail

      • cropImageToFace

        public static android.graphics.Bitmap cropImageToFace​(android.graphics.Bitmap image,
                                                              Face face)
      • bitmapFromImage

        public android.graphics.Bitmap bitmapFromImage​(Image image)
      • bitmapToGrayscale

        public byte[] bitmapToGrayscale​(android.graphics.Bitmap bitmap,
                                        int orientation)
      • bitmapToGrayscale

        public byte[] bitmapToGrayscale​(android.graphics.Bitmap bitmap,
                                        int orientation,
                                        float rWeight,
                                        float gWeight,
                                        float bWeight)
      • sharpnessOfImage

        public double sharpnessOfImage​(byte[] imageBuffer,
                                       int width,
                                       int height)
                                throws java.lang.Exception
        Throws:
        java.lang.Exception
      • brightnessContrastAndSharpnessOfImage

        public BrightnessContrastSharpness brightnessContrastAndSharpnessOfImage​(byte[] imageBuffer,
                                                                                 int width,
                                                                                 int height)
                                                                          throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getMatrixFromExifOrientation

        public static android.graphics.Matrix getMatrixFromExifOrientation​(int exifOrientation)