java.lang.Object | |
↳ | com.facebook.imagepipeline.bitmaps.PlatformBitmapFactory |
Known Direct Subclasses |
Bitmap factory optimized for the platform.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
PlatformBitmapFactory() |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
CloseableReference<Bitmap> |
createBitmap(int[] colors, int width, int height, Bitmap.Config config, Object callerContext)
Creates a bitmap with the specified width and height.
| ||||||||||
CloseableReference<Bitmap> |
createBitmap(Bitmap source, Object callerContext)
Creates a bitmap from the specified source bitmap.
| ||||||||||
CloseableReference<Bitmap> |
createBitmap(int width, int height, Object callerContext)
Creates a bitmap of the specified width and height.
| ||||||||||
CloseableReference<Bitmap> |
createBitmap(DisplayMetrics display, int[] colors, int width, int height, Bitmap.Config config, Object callerContext)
Creates a bitmap with the specified width and height.
| ||||||||||
CloseableReference<Bitmap> |
createBitmap(int width, int height)
Creates a bitmap of the specified width and height.
| ||||||||||
CloseableReference<Bitmap> |
createBitmap(Bitmap source, int x, int y, int width, int height, Matrix matrix, boolean filter, Object callerContext)
Creates a bitmap from subset of the source bitmap, transformed by the optional matrix.
| ||||||||||
CloseableReference<Bitmap> |
createBitmap(Bitmap source, int x, int y, int width, int height, Matrix matrix, boolean filter)
Creates a bitmap from subset of the source bitmap, transformed by the optional matrix.
| ||||||||||
CloseableReference<Bitmap> |
createBitmap(DisplayMetrics display, int[] colors, int offset, int stride, int width, int height, Bitmap.Config config)
Creates a bitmap with the specified width and height.
| ||||||||||
CloseableReference<Bitmap> |
createBitmap(DisplayMetrics display, int[] colors, int width, int height, Bitmap.Config config)
Creates a bitmap with the specified width and height.
| ||||||||||
CloseableReference<Bitmap> |
createBitmap(Bitmap source, int x, int y, int width, int height, Object callerContext)
Creates a bitmap from the specified subset of the source bitmap.
| ||||||||||
CloseableReference<Bitmap> |
createBitmap(Bitmap source, int x, int y, int width, int height)
Creates a bitmap from the specified subset of the source bitmap.
| ||||||||||
CloseableReference<Bitmap> |
createBitmap(int width, int height, Bitmap.Config bitmapConfig)
Creates a bitmap of the specified width and height.
| ||||||||||
CloseableReference<Bitmap> |
createBitmap(Bitmap source)
Creates a bitmap from the specified source bitmap.
| ||||||||||
CloseableReference<Bitmap> |
createBitmap(int width, int height, Bitmap.Config bitmapConfig, Object callerContext)
Creates a bitmap of the specified width and height.
| ||||||||||
CloseableReference<Bitmap> |
createBitmap(DisplayMetrics display, int width, int height, Bitmap.Config config, Object callerContext)
Creates a bitmap with the specified width and height.
| ||||||||||
CloseableReference<Bitmap> |
createBitmap(DisplayMetrics display, int width, int height, Bitmap.Config config)
Creates a bitmap with the specified width and height.
| ||||||||||
CloseableReference<Bitmap> |
createBitmap(int[] colors, int width, int height, Bitmap.Config config)
Creates a bitmap with the specified width and height.
| ||||||||||
CloseableReference<Bitmap> |
createBitmap(DisplayMetrics display, int[] colors, int offset, int stride, int width, int height, Bitmap.Config config, Object callerContext)
Creates a bitmap with the specified width and height.
| ||||||||||
abstract CloseableReference<Bitmap> |
createBitmapInternal(int width, int height, Bitmap.Config bitmapConfig)
Creates a bitmap of the specified width and height.
| ||||||||||
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.
| ||||||||||
CloseableReference<Bitmap> |
createScaledBitmap(Bitmap source, int destinationWidth, int destinationHeight, boolean filter, Object callerContext)
Creates a bitmap from the specified source scaled to have the height and width as specified.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Creates a bitmap with the specified width and height. Its initial density is determined from the given DisplayMetrics.
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 |
if the pool is full | |
OutOfMemoryError | if the Bitmap cannot be allocated |
Creates a bitmap from the specified source bitmap. It is initialized with the same density as the original bitmap.
source | The bitmap we are copying |
---|---|
callerContext | the Tag to track who create the Bitmap |
IllegalArgumentException | if the x, y, width, height values are outside of the dimensions of the source bitmap, or width is <= 0, or height is <= 0 |
---|---|
if the pool is full | |
OutOfMemoryError | if the Bitmap cannot be allocated |
Creates a bitmap of the specified width and height. The bitmap will be created with the default ARGB_8888 configuration
width | the width of the bitmap |
---|---|
height | the height of the bitmap |
callerContext | the Tag to track who create the Bitmap |
if the pool is full | |
OutOfMemoryError | if the Bitmap cannot be allocated |
Creates a bitmap with the specified width and height. Its initial density is determined from the given DisplayMetrics.
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 |
IllegalArgumentException | if the width or height are <= 0 |
---|---|
if the pool is full | |
OutOfMemoryError | if the Bitmap cannot be allocated |
Creates a bitmap of the specified width and height. The bitmap will be created with the default ARGB_8888 configuration
width | the width of the bitmap |
---|---|
height | the height of the bitmap |
if the pool is full | |
OutOfMemoryError | if the Bitmap cannot be allocated |
Creates a bitmap from subset of the source bitmap, transformed by the optional matrix. It is initialized with the same density as the original bitmap.
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. Only applies if the matrix contains more than just translation. |
callerContext | the Tag to track who create the Bitmap |
IllegalArgumentException | if the x, y, width, height values are outside of the dimensions of the source bitmap, or width is <= 0, or height is <= 0 |
---|---|
if the pool is full | |
OutOfMemoryError | if the Bitmap cannot be allocated |
Creates a bitmap from subset of the source bitmap, transformed by the optional matrix. It is initialized with the same density as the original bitmap.
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. Only applies if the matrix contains more than just translation. |
IllegalArgumentException | if the x, y, width, height values are outside of the dimensions of the source bitmap, or width is <= 0, or height is <= 0 |
---|---|
if the pool is full | |
OutOfMemoryError | if the Bitmap cannot be allocated |
Creates a bitmap with the specified width and height. Its initial density is determined from the given DisplayMetrics.
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 |
IllegalArgumentException | if the width or height are <= 0 |
---|---|
if the pool is full | |
OutOfMemoryError | if the Bitmap cannot be allocated |
Creates a bitmap with the specified width and height. Its initial density is determined from the given DisplayMetrics.
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 |
IllegalArgumentException | if the width or height are <= 0 |
---|---|
if the pool is full | |
OutOfMemoryError | if the Bitmap cannot be allocated |
Creates a bitmap from the specified subset of the source bitmap. It is initialized with the same density as the original bitmap.
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 |
IllegalArgumentException | if the x, y, width, height values are outside of the dimensions of the source bitmap, or width is <= 0, or height is <= 0 |
---|---|
if the pool is full | |
OutOfMemoryError | if the Bitmap cannot be allocated |
Creates a bitmap from the specified subset of the source bitmap. It is initialized with the same density as the original bitmap.
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 |
IllegalArgumentException | if the x, y, width, height values are outside of the dimensions of the source bitmap, or width is <= 0, or height is <= 0 |
---|---|
if the pool is full | |
OutOfMemoryError | if the Bitmap cannot be allocated |
Creates a bitmap of the specified width and height.
width | the width of the bitmap |
---|---|
height | the height of the bitmap |
bitmapConfig | the Bitmap.Config used to create the Bitmap |
if the pool is full | |
OutOfMemoryError | if the Bitmap cannot be allocated |
Creates a bitmap from the specified source bitmap. It is initialized with the same density as the original bitmap.
source | The bitmap we are copying |
---|
IllegalArgumentException | if the x, y, width, height values are outside of the dimensions of the source bitmap, or width is <= 0, or height is <= 0 |
---|---|
if the pool is full | |
OutOfMemoryError | if the Bitmap cannot be allocated |
Creates a bitmap of the specified width and height.
width | the width of the bitmap |
---|---|
height | the height of the bitmap |
bitmapConfig | the Bitmap.Config used to create the Bitmap |
callerContext | the Tag to track who create the Bitmap |
if the pool is full | |
OutOfMemoryError | if the Bitmap cannot be allocated |
Creates a bitmap with the specified width and height. Its initial density is determined from the given DisplayMetrics.
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 |
IllegalArgumentException | if the width or height are <= 0 |
---|---|
if the pool is full | |
OutOfMemoryError | if the Bitmap cannot be allocated |
Creates a bitmap with the specified width and height. Its initial density is determined from the given DisplayMetrics.
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. |
IllegalArgumentException | if the width or height are <= 0 |
---|---|
if the pool is full | |
OutOfMemoryError | if the Bitmap cannot be allocated |
Creates a bitmap with the specified width and height. Its initial density is determined from the given DisplayMetrics.
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 |
if the pool is full | |
OutOfMemoryError | if the Bitmap cannot be allocated |
Creates a bitmap with the specified width and height. Its initial density is determined from the given DisplayMetrics.
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 |
IllegalArgumentException | if the width or height are <= 0 |
---|---|
if the pool is full | |
OutOfMemoryError | if the Bitmap cannot be allocated |
Creates a bitmap of the specified width and height. This is intended for ImagePipeline's internal use only.
width | the width of the bitmap |
---|---|
height | the height of the bitmap |
bitmapConfig | the Bitmap.Config used to create the Bitmap |
if the pool is full | |
OutOfMemoryError | if the Bitmap cannot be allocated |
Creates a bitmap from the specified source scaled to have the height and width as specified. It is initialized with the same density as the original bitmap.
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 |
IllegalArgumentException | if the destinationWidth is <= 0, or destinationHeight is <= 0 |
---|---|
if the pool is full | |
OutOfMemoryError | if the Bitmap cannot be allocated |
Creates a bitmap from the specified source scaled to have the height and width as specified. It is initialized with the same density as the original bitmap.
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 |
IllegalArgumentException | if the destinationWidth is <= 0, or destinationHeight is <= 0 |
---|---|
if the pool is full | |
OutOfMemoryError | if the Bitmap cannot be allocated |