Class imageUtils

java.lang.Object
com.example.oblong.imageUtils

public class imageUtils extends Object
Utility class for encoding Bitmaps to Base64 strings and decoding Base64 strings back to Bitmaps. for storage in Firebase since Base64 gets stored as a string
  • Constructor Details

    • imageUtils

      public imageUtils()
  • Method Details

    • bitmapToBase64

      public static String bitmapToBase64(android.graphics.Bitmap bitmap)
      Converts a Bitmap image to a Base64-encoded string.
      Parameters:
      bitmap - The Bitmap image to encode.
      Returns:
      A Base64-encoded string representing the image.
    • base64ToBitmap

      public static android.graphics.Bitmap base64ToBitmap(String base64String)
      Converts a Base64-encoded string back to a Bitmap image.
      Parameters:
      base64String - The Base64-encoded string to decode.
      Returns:
      A Bitmap image decoded from the Base64 string.