docs/javadoc/reference/com/facebook/imagepipeline/image/EncodedImage.html
|
|
Summary: Constants | Ctors | Methods | Protected Methods | Inherited Methods | [Expand All]
public class
extends Object
implements Closeable
| java.lang.Object | | ↳ | com.facebook.imagepipeline.image.EncodedImage |
Class that contains all the information for an encoded image, both the image bytes (held on a byte buffer or a supplier of input streams) and the extracted meta data that is useful for image transforms.
Only one of the input stream supplier or the byte buffer can be set. If using an input stream supplier, the methods that return a byte buffer will simply return null. However, getInputStream will always be supported, either from the supplier or an input stream created from the byte buffer held.
Currently the data is useful for rotation and resize.
| Constants |
|---|
| int |
| int |
| int |
| int |
| int |
| Public Constructors |
|---|
| Public Methods |
|---|
| EncodedImage |
| static EncodedImage |
| Returns the cloned encoded image if the parameter received is not null, null otherwise. |
| void |
| Closes the buffer enclosed by this class. |
| static void |
| Closes the encoded image handling null. |
| void |
| Copy the meta data from another EncodedImage. |
| CloseableReference<PooledByteBuffer> |
| Returns a cloned reference to the stored encoded bytes. |
| BytesRange |
| ColorSpace |
| The color space is always null if Android API level < 26. |
| int |
| Returns the exif orientation if known (1 - 8), else 0. |
| String |
| Returns first n bytes of encoded image as hexbytes |
| int |
| Returns the image height if known, else -1. |
| ImageFormat |
| Returns the image format if known, otherwise ImageFormat.UNKNOWN. |
| InputStream |
| Returns an InputStream from the internal InputStream Supplier if it's not null. |
| int |
| int |
| Only valid if the image format is JPEG. |
| int |
| Returns the size of the backing structure. |
| synchronized SharedReference<PooledByteBuffer> |
| A test-only method to get the underlying references. |
| int |
| Returns the image width if known, else -1. |
| boolean |
| Returns true if the image is a JPEG or DNG and its data is already complete at the specified length, false otherwise. |
| static boolean |
| Returns true if all the image information has loaded, false otherwise. |
| synchronized boolean |
| Returns true if the internal buffer reference is valid or the InputStream Supplier is not null, false otherwise. |
| static boolean |
| Checks if the encoded image is valid i.e. |
| void |
| void |
| void |
| Sets the exif orientation |
| void |
| Sets the image height |
| void |
| Sets the image format |
| void |
| Sets the image rotation angle |
| void |
| Sets the image sample size |
| void |
| Sets the size of an image if backed by an InputStream |
Ignored if backed by a ByteBuffer
| | static void | setUseCachedMetadata(boolean useCachedMetadata) | | void | setWidth(int width) Sets the image width |
| Protected Methods |
|---|
| boolean |
| [Expand] Inherited Methods | | --- | | 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 java.io.Closeable
| abstract void | close() |
| | From interface java.lang.AutoCloseable
| abstract void | close() |
|
Constant Value: 1 (0x00000001)
Constant Value: -1 (0xffffffff)
Constant Value: -1 (0xffffffff)
Constant Value: -1 (0xffffffff)
Constant Value: -1 (0xffffffff)
Returns the cloned encoded image if the parameter received is not null, null otherwise.
| encodedImage | the EncodedImage to clone |
Closes the buffer enclosed by this class.
Closes the encoded image handling null.
| encodedImage | the encoded image to close. |
Copy the meta data from another EncodedImage.
| encodedImage | the EncodedImage to copy the meta data from. |
Returns a cloned reference to the stored encoded bytes.
The caller has to close the reference once it has finished using it.
The color space is always null if Android API level < 26.
Returns the exif orientation if known (1 - 8), else 0.
Returns first n bytes of encoded image as hexbytes
| length | the number of bytes to return |
Returns the image height if known, else -1.
Returns the image format if known, otherwise ImageFormat.UNKNOWN.
Returns an InputStream from the internal InputStream Supplier if it's not null. Otherwise returns an InputStream for the internal buffer reference if valid and null otherwise.
The caller has to close the InputStream after using it.
Only valid if the image format is JPEG.
Returns the size of the backing structure.
If it's a PooledByteBuffer returns its size if its not null, -1 otherwise. If it's an InputStream, return the size if it was set, -1 otherwise.
A test-only method to get the underlying references.
DO NOT USE in application code.
Returns the image width if known, else -1.
Returns true if the image is a JPEG or DNG and its data is already complete at the specified length, false otherwise.
Returns true if all the image information has loaded, false otherwise.
Returns true if the internal buffer reference is valid or the InputStream Supplier is not null, false otherwise.
Checks if the encoded image is valid i.e. is not null, and is not closed.
Sets the exif orientation
Sets the image height
Sets the image format
Sets the image rotation angle
Sets the image sample size
Sets the size of an image if backed by an InputStream
Ignored if backed by a ByteBuffer
Sets the image width
+Generated by Doclava. +