IT. Expert System.

Android Reference

BitmapFactory


android.graphics

Class BitmapFactory



  • public class BitmapFactory
    extends Object
    Creates Bitmap objects from various sources, including files, streams, and byte-arrays.
    • Constructor Detail

      • BitmapFactory

        public BitmapFactory()
    • Method Detail

      • decodeFile

        public static Bitmap decodeFile(String pathName,
                        BitmapFactory.Options opts)
        Decode a file path into a bitmap. If the specified file name is null, or cannot be decoded into a bitmap, the function returns null.
        Parameters:
        pathName - complete path name for the file to be decoded.
        opts - null-ok; Options that control downsampling and whether the image should be completely decoded, or just is size returned.
        Returns:
        The decoded bitmap, or null if the image data could not be decoded, or, if opts is non-null, if opts requested only the size be returned (in opts.outWidth and opts.outHeight)
      • decodeFile

        public static Bitmap decodeFile(String pathName)
        Decode a file path into a bitmap. If the specified file name is null, or cannot be decoded into a bitmap, the function returns null.
        Parameters:
        pathName - complete path name for the file to be decoded.
        Returns:
        the resulting decoded bitmap, or null if it could not be decoded.
      • decodeByteArray

        public static Bitmap decodeByteArray(byte[] data,
                             int offset,
                             int length,
                             BitmapFactory.Options opts)
        Decode an immutable bitmap from the specified byte array.
        Parameters:
        data - byte array of compressed image data
        offset - offset into imageData for where the decoder should begin parsing.
        length - the number of bytes, beginning at offset, to parse
        opts - null-ok; Options that control downsampling and whether the image should be completely decoded, or just is size returned.
        Returns:
        The decoded bitmap, or null if the image data could not be decoded, or, if opts is non-null, if opts requested only the size be returned (in opts.outWidth and opts.outHeight)
      • decodeByteArray

        public static Bitmap decodeByteArray(byte[] data,
                             int offset,
                             int length)
        Decode an immutable bitmap from the specified byte array.
        Parameters:
        data - byte array of compressed image data
        offset - offset into imageData for where the decoder should begin parsing.
        length - the number of bytes, beginning at offset, to parse
        Returns:
        The decoded bitmap, or null if the image could not be decode.
      • decodeStream

        public static Bitmap decodeStream(InputStream is,
                          Rect outPadding,
                          BitmapFactory.Options opts)
        Decode an input stream into a bitmap. If the input stream is null, or cannot be used to decode a bitmap, the function returns null. The stream's position will be where ever it was after the encoded data was read.
        Parameters:
        is - The input stream that holds the raw data to be decoded into a bitmap.
        outPadding - If not null, return the padding rect for the bitmap if it exists, otherwise set padding to [-1,-1,-1,-1]. If no bitmap is returned (null) then padding is unchanged.
        opts - null-ok; Options that control downsampling and whether the image should be completely decoded, or just is size returned.
        Returns:
        The decoded bitmap, or null if the image data could not be decoded, or, if opts is non-null, if opts requested only the size be returned (in opts.outWidth and opts.outHeight)
      • decodeStream

        public static Bitmap decodeStream(InputStream is)
        Decode an input stream into a bitmap. If the input stream is null, or cannot be used to decode a bitmap, the function returns null. The stream's position will be where ever it was after the encoded data was read.
        Parameters:
        is - The input stream that holds the raw data to be decoded into a bitmap.
        Returns:
        The decoded bitmap, or null if the image data could not be decoded.
      • decodeFileDescriptor

        public static Bitmap decodeFileDescriptor(FileDescriptor fd,
                                  Rect outPadding,
                                  BitmapFactory.Options opts)
        Decode a bitmap from the file descriptor. If the bitmap cannot be decoded return null. The position within the descriptor will not be changed when this returns, so the descriptor can be used again as-is.
        Parameters:
        fd - The file descriptor containing the bitmap data to decode
        outPadding - If not null, return the padding rect for the bitmap if it exists, otherwise set padding to [-1,-1,-1,-1]. If no bitmap is returned (null) then padding is unchanged.
        opts - null-ok; Options that control downsampling and whether the image should be completely decoded, or just is size returned.
        Returns:
        the decoded bitmap, or null
      • decodeFileDescriptor

        public static Bitmap decodeFileDescriptor(FileDescriptor fd)
        Decode a bitmap from the file descriptor. If the bitmap cannot be decoded return null. The position within the descriptor will not be changed when this returns, so the descriptor can be used again as is.
        Parameters:
        fd - The file descriptor containing the bitmap data to decode
        Returns:
        the decoded bitmap, or null


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 266 / 158856864. Delta: 0.04312 с