Back to Fresco

CloseableStaticBitmap

docs/javadoc/reference/com/facebook/imagepipeline/image/CloseableStaticBitmap.html

3.6.022.1 KB
Original Source

Fresco

|

|

Packages | Classes

Interfaces

Classes

Enums

Packages | Classes

Summary: Ctors | Methods | Inherited Methods | [Expand All]

public class

CloseableStaticBitmap

extends CloseableBitmap
implements HasBitmap

| java.lang.Object | | ↳ | com.facebook.imagepipeline.image.CloseableImage | | | ↳ | com.facebook.imagepipeline.image.CloseableBitmap | | | | ↳ | com.facebook.imagepipeline.image.CloseableStaticBitmap |

Class Overview

CloseableImage that contains one Bitmap.

Summary

Public Constructors
Creates a new instance of a CloseableStaticBitmap.
Creates a new instance of a CloseableStaticBitmap.
Creates a new instance of a CloseableStaticBitmap from an existing CloseableReference.
Creates a new instance of a CloseableStaticBitmap from an existing CloseableReference.
Public Methods
synchronized CloseableReference<Bitmap>
Get a cloned bitmap reference for the underlying original CloseableReference<Bitmap>.
void
Releases the bitmap to the pool.
synchronized CloseableReference<Bitmap>
Convert this object to a CloseableReference<Bitmap>.
int
int
QualityInfo
Returns quality information for the image.
int
int
Bitmap
Gets the underlying bitmap.
int
synchronized boolean
Returns whether this instance is closed.

| [Expand] Inherited Methods | | --- | | From class com.facebook.imagepipeline.image.CloseableBitmap

| abstract Bitmap | getUnderlyingBitmap() Gets the underlying bitmap. |

| | From class com.facebook.imagepipeline.image.CloseableImage

| abstract void | close() Closes this instance and releases the resources. | | void | finalize() Ensures that the underlying resources are always properly released. | | Map<String, Object> | getExtras() | | QualityInfo | getQualityInfo() Returns quality information for the image. | | abstract int | getSizeInBytes() | | abstract boolean | isClosed() Returns whether this instance is closed. | | boolean | isStateful() Whether or not this image contains state for a particular view of the image (for example, the image for an animated GIF might contain the current frame being viewed). | | void | setImageExtras(Map<String, Object> extras) Sets extras that match mImageExtrasList to this image from supplied extras |

| | From class java.lang.Object

| Object | clone() | | boolean | equals(Object arg0) | | void | finalize() | | final Class<?> | getClass() | | int | hashCode() | | final void | notify() | | final void | notifyAll() | | String | toString() | | final void | wait(long arg0, int arg1) | | final void | wait(long arg0) | | final void | wait() |

| | From interface com.facebook.imagepipeline.image.HasImageMetadata

| abstract Map<String, Object> | getExtras() |

| | From interface com.facebook.imagepipeline.image.ImageInfo

| abstract int | getHeight() | | abstract QualityInfo | getQualityInfo() | | abstract int | getWidth() |

| | From interface java.io.Closeable

| abstract void | close() |

| | From interface java.lang.AutoCloseable

| abstract void | close() |

|

Public Constructors

public CloseableStaticBitmap(Bitmap bitmap, ResourceReleaser<Bitmap> resourceReleaser, QualityInfo qualityInfo, int rotationAngle)

Creates a new instance of a CloseableStaticBitmap.

Parameters

| bitmap | the bitmap to wrap | | resourceReleaser | ResourceReleaser to release the bitmap to |

public CloseableStaticBitmap(Bitmap bitmap, ResourceReleaser<Bitmap> resourceReleaser, QualityInfo qualityInfo, int rotationAngle, int exifOrientation)

Creates a new instance of a CloseableStaticBitmap.

Parameters

| bitmap | the bitmap to wrap | | resourceReleaser | ResourceReleaser to release the bitmap to |

public CloseableStaticBitmap(CloseableReference<Bitmap> bitmapReference, QualityInfo qualityInfo, int rotationAngle)

Creates a new instance of a CloseableStaticBitmap from an existing CloseableReference. The CloseableStaticBitmap will hold a reference to the Bitmap until it's closed.

Parameters

| bitmapReference | the bitmap reference. |

public CloseableStaticBitmap(CloseableReference<Bitmap> bitmapReference, QualityInfo qualityInfo, int rotationAngle, int exifOrientation)

Creates a new instance of a CloseableStaticBitmap from an existing CloseableReference. The CloseableStaticBitmap will hold a reference to the Bitmap until it's closed.

Parameters

| bitmapReference | the bitmap reference. |

Public Methods

public synchronized CloseableReference<Bitmap> cloneUnderlyingBitmapReference()

Get a cloned bitmap reference for the underlying original CloseableReference<Bitmap>.

After calling this method, this object can still be used. See convertToBitmapReference() for an alternative that detaches the original reference instead.

Returns
  • the cloned bitmap reference without altering this instance or null if already closed

public void close()

Releases the bitmap to the pool.

public synchronized CloseableReference<Bitmap> convertToBitmapReference()

Convert this object to a CloseableReference<Bitmap>.

You cannot call this method on an object that has already been closed.

The reference count of the bitmap is preserved. After calling this method, this object can no longer be used and no longer points to the bitmap.

See cloneUnderlyingBitmapReference() for an alternative that returns a cloned bitmap reference instead.

Returns
  • the underlying bitmap reference after being detached from this instance
Throws

| IllegalArgumentException | if this object has already been closed. |

public int getExifOrientation()

Returns
  • the EXIF orientation of the image

public int getHeight()

Returns
  • height of the image

public QualityInfo getQualityInfo()

Returns quality information for the image.

public int getRotationAngle()

Returns
  • the rotation angle of the image

public int getSizeInBytes()

Returns
  • size in bytes of the underlying bitmap

public Bitmap getUnderlyingBitmap()

Gets the underlying bitmap.

Returns
  • the underlying bitmap

public int getWidth()

Returns
  • width of the image

public synchronized boolean isClosed()

Returns whether this instance is closed.

+Generated by Doclava. +