Back to Fresco

DownsampleUtil

docs/javadoc/reference/com/facebook/imagepipeline/transcoder/DownsampleUtil.html

3.6.014.4 KB
Original Source

Fresco

|

|

Packages | Classes

Interfaces

Classes

Annotations

Packages | Classes

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

public class

DownsampleUtil

extends Object

| java.lang.Object | | ↳ | com.facebook.imagepipeline.transcoder.DownsampleUtil |

Summary

Constants
int
Public Methods
static float
static int
Get the factor between the dimensions of the encodedImage (actual image) and the ones of the imageRequest (requested size).
static int
static int
static int
static int

| [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() |

|

Constants

public static final int DEFAULT_SAMPLE_SIZE

Constant Value: 1 (0x00000001)

Public Methods

public static float determineDownsampleRatio(RotationOptions rotationOptions, ResizeOptions resizeOptions, EncodedImage encodedImage)

public static int determineSampleSize(RotationOptions rotationOptions, ResizeOptions resizeOptions, EncodedImage encodedImage, int maxBitmapSize)

Get the factor between the dimensions of the encodedImage (actual image) and the ones of the imageRequest (requested size).

Parameters

| rotationOptions | the rotations options of the request | | resizeOptions | the resize options of the request | | encodedImage | the encoded image with the actual dimensions | | maxBitmapSize | the maximum supported bitmap size (in pixels) when not specified in the encoded image resizeOptions. |

public static int determineSampleSizeJPEG(EncodedImage encodedImage, int pixelSize, int maxBitmapSizeInBytes)

public static int ratioToSampleSize(float ratio)

public static int ratioToSampleSizeJPEG(float ratio)

public static int roundToPowerOfTwo(int sampleSize)

+Generated by Doclava. +