Package 

Class PlatformBitmapFactory

    • Method Detail

      • createBitmap

         CloseableReference<Bitmap> createBitmap(int width, int height, Bitmap.Config bitmapConfig)

        Creates a bitmap of the specified width and height.

        Parameters:
        width - the width of the bitmap
        height - the height of the bitmap
        bitmapConfig - the Bitmap.
      • createBitmap

         CloseableReference<Bitmap> createBitmap(int width, int height)

        Creates a bitmap of the specified width and height. The bitmap will be created with the defaultARGB_8888 configuration

        Parameters:
        width - the width of the bitmap
        height - the height of the bitmap
      • createBitmap

         CloseableReference<Bitmap> createBitmap(int width, int height, Bitmap.Config bitmapConfig, @Nullable() Object callerContext)

        Creates a bitmap of the specified width and height.

        Parameters:
        width - the width of the bitmap
        height - the height of the bitmap
        bitmapConfig - the Bitmap.
        callerContext - the Tag to track who create the Bitmap
      • createBitmap

         CloseableReference<Bitmap> createBitmap(int width, int height, @Nullable() Object callerContext)

        Creates a bitmap of the specified width and height. The bitmap will be created with the defaultARGB_8888 configuration

        Parameters:
        width - the width of the bitmap
        height - the height of the bitmap
        callerContext - the Tag to track who create the Bitmap
      • createBitmap

         CloseableReference<Bitmap> createBitmap(Bitmap source)

        Creates a bitmap from the specified source bitmap. It is initialized with the same density asthe original bitmap.

        Parameters:
        source - The bitmap we are copying
      • createBitmap

         CloseableReference<Bitmap> createBitmap(Bitmap source, @Nullable() Object callerContext)

        Creates a bitmap from the specified source bitmap. It is initialized with the same density asthe original bitmap.

        Parameters:
        source - The bitmap we are copying
        callerContext - the Tag to track who create the Bitmap
      • createBitmap

         CloseableReference<Bitmap> createBitmap(Bitmap source, int x, int y, int width, int height)

        Creates a bitmap from the specified subset of the source bitmap. It is initialized with thesame density as the original bitmap.

        Parameters:
        source - The bitmap we are subsetting
        x - The x coordinate of the first pixel in source
        y - The y coordinate of the first pixel in source
        width - The number of pixels in each row
        height - The number of rows
      • createBitmap

         CloseableReference<Bitmap> createBitmap(Bitmap source, int x, int y, int width, int height, @Nullable() Object callerContext)

        Creates a bitmap from the specified subset of the source bitmap. It is initialized with thesame density as the original bitmap.

        Parameters:
        source - The bitmap we are subsetting
        x - The x coordinate of the first pixel in source
        y - The y coordinate of the first pixel in source
        width - The number of pixels in each row
        height - The number of rows
        callerContext - the Tag to track who create the Bitmap
      • createBitmap

         CloseableReference<Bitmap> createBitmap(Bitmap source, int x, int y, int width, int height, @Nullable() Matrix matrix, boolean filter)

        Creates a bitmap from subset of the source bitmap, transformed by the optional matrix. It isinitialized with the same density as the original bitmap.

        Parameters:
        source - The bitmap we are subsetting
        x - The x coordinate of the first pixel in source
        y - The y coordinate of the first pixel in source
        width - The number of pixels in each row
        height - The number of rows
        matrix - Optional matrix to be applied to the pixels
        filter - true if the source should be filtered.
      • createScaledBitmap

         CloseableReference<Bitmap> createScaledBitmap(Bitmap source, int destinationWidth, int destinationHeight, boolean filter)

        Creates a bitmap from the specified source scaled to have the height and width as specified. Itis initialized with the same density as the original bitmap.

        Parameters:
        source - The bitmap we are subsetting
        destinationWidth - The number of pixels in each row of the final bitmap
        destinationHeight - The number of rows in the final bitmap
      • createScaledBitmap

         CloseableReference<Bitmap> createScaledBitmap(Bitmap source, int destinationWidth, int destinationHeight, boolean filter, @Nullable() Object callerContext)

        Creates a bitmap from the specified source scaled to have the height and width as specified. Itis initialized with the same density as the original bitmap.

        Parameters:
        source - The bitmap we are subsetting
        destinationWidth - The number of pixels in each row of the final bitmap
        destinationHeight - The number of rows in the final bitmap
        callerContext - the Tag to track who create the Bitmap
      • createBitmap

         CloseableReference<Bitmap> createBitmap(Bitmap source, int x, int y, int width, int height, @Nullable() Matrix matrix, boolean filter, @Nullable() Object callerContext)

        Creates a bitmap from subset of the source bitmap, transformed by the optional matrix. It isinitialized with the same density as the original bitmap.

        Parameters:
        source - The bitmap we are subsetting
        x - The x coordinate of the first pixel in source
        y - The y coordinate of the first pixel in source
        width - The number of pixels in each row
        height - The number of rows
        matrix - Optional matrix to be applied to the pixels
        filter - true if the source should be filtered.
        callerContext - the Tag to track who create the Bitmap
      • createBitmap

         CloseableReference<Bitmap> createBitmap(DisplayMetrics display, int width, int height, Bitmap.Config config)

        Creates a bitmap with the specified width and height. Its initial density is determined fromthe given DisplayMetrics.

        Parameters:
        display - Display metrics for the display this bitmap will be drawn on.
        width - The width of the bitmap
        height - The height of the bitmap
        config - The bitmap config to create.
      • createBitmap

         CloseableReference<Bitmap> createBitmap(DisplayMetrics display, int width, int height, Bitmap.Config config, @Nullable() Object callerContext)

        Creates a bitmap with the specified width and height. Its initial density is determined fromthe given DisplayMetrics.

        Parameters:
        display - Display metrics for the display this bitmap will be drawn on.
        width - The width of the bitmap
        height - The height of the bitmap
        config - The bitmap config to create.
        callerContext - the Tag to track who create the Bitmap
      • createBitmap

         CloseableReference<Bitmap> createBitmap(Array<int> colors, int width, int height, Bitmap.Config config)

        Creates a bitmap with the specified width and height. Its initial density is determined fromthe given DisplayMetrics.

        Parameters:
        colors - The colors to write to the bitmap
        width - The width of the bitmap
        height - The height of the bitmap
        config - The bitmap config to create
      • createBitmap

         CloseableReference<Bitmap> createBitmap(Array<int> colors, int width, int height, Bitmap.Config config, @Nullable() Object callerContext)

        Creates a bitmap with the specified width and height. Its initial density is determined fromthe given DisplayMetrics.

        Parameters:
        colors - The colors to write to the bitmap
        width - The width of the bitmap
        height - The height of the bitmap
        config - The bitmap config to create
        callerContext - the Tag to track who create the Bitmap
      • createBitmap

         CloseableReference<Bitmap> createBitmap(DisplayMetrics display, Array<int> colors, int width, int height, Bitmap.Config config)

        Creates a bitmap with the specified width and height. Its initial density is determined fromthe given DisplayMetrics.

        Parameters:
        display - Display metrics for the display this bitmap will be drawn on
        colors - The colors to write to the bitmap
        width - The width of the bitmap
        height - The height of the bitmap
        config - The bitmap config to create
      • createBitmap

         CloseableReference<Bitmap> createBitmap(DisplayMetrics display, Array<int> colors, int width, int height, Bitmap.Config config, @Nullable() Object callerContext)

        Creates a bitmap with the specified width and height. Its initial density is determined fromthe given DisplayMetrics.

        Parameters:
        display - Display metrics for the display this bitmap will be drawn on
        colors - The colors to write to the bitmap
        width - The width of the bitmap
        height - The height of the bitmap
        config - The bitmap config to create
        callerContext - the Tag to track who create the Bitmap
      • createBitmap

         CloseableReference<Bitmap> createBitmap(DisplayMetrics display, Array<int> colors, int offset, int stride, int width, int height, Bitmap.Config config)

        Creates a bitmap with the specified width and height. Its initial density is determined fromthe given DisplayMetrics.

        Parameters:
        display - Display metrics for the display this bitmap will be drawn on
        colors - The colors to write to the bitmap
        offset - The index of the first color to read from colors[]
        stride - The number of colors in pixels[] to skip between rows.
        width - The width of the bitmap
        height - The height of the bitmap
        config - The bitmap config to create
      • createBitmap

         CloseableReference<Bitmap> createBitmap(DisplayMetrics display, Array<int> colors, int offset, int stride, int width, int height, Bitmap.Config config, @Nullable() Object callerContext)

        Creates a bitmap with the specified width and height. Its initial density is determined fromthe given DisplayMetrics.

        Parameters:
        display - Display metrics for the display this bitmap will be drawn on
        colors - The colors to write to the bitmap
        offset - The index of the first color to read from colors[]
        stride - The number of colors in pixels[] to skip between rows.
        width - The width of the bitmap
        height - The height of the bitmap
        config - The bitmap config to create
        callerContext - the Tag to track who create the Bitmap
      • createBitmapInternal

         abstract CloseableReference<Bitmap> createBitmapInternal(int width, int height, Bitmap.Config bitmapConfig)

        Creates a bitmap of the specified width and height. This is intended for ImagePipeline'sinternal use only.

        Parameters:
        width - the width of the bitmap
        height - the height of the bitmap
        bitmapConfig - the Bitmap.