Android+bitmap Class

Source: Internet
Author: User

public void Getpixels (int[] pixels, int offset, int stride, int x, int y, int width, int height)

Copy the data from the bitmap to pixels[]. Each one is represented by an int value that represents the color value. The amplitude parameter indicates the pixel array line spacing allowed by the caller. For the usual fill result, just pass the width value to the amplitude parameter.
Parameters
pixels array to receive bitmap color values
The first pixel index value in offset write to pixels[]
Stride Pixels[] The number of line spacing (must be greater than or equal to the bitmap width). Can be a negative number
x The x-coordinate value of the first pixel read from the bitmap.
Y the y-coordinate value of the first pixel read from a bitmap
Width of pixels read from each row
Number of rows read by height
Abnormal
Iilegalargumentexcepiton is thrown if the x,y,width,height is out of bounds or if the absolute value of stride is less than the bitmap width.
ArrayIndexOutOfBoundsException is thrown if the number of pixels in the array is too small to receive the pixel value of the specified bibliography.

RELATED links:

http://ranlic.iteye.com/blog/1313735//introduce getpixels function

Android+bitmap Class

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.