Lines Matching refs:image

35  * <p>The ImageReader class allows direct application access to image data
41 * {@link android.renderscript.Allocation RenderScript Allocations}. The image
45 * <p>The image data is encapsulated in {@link Image} objects, and multiple such
49 * or {@link #acquireNextImage} call. Due to memory limits, an image source will
57 * Returned by nativeImageSetup when acquiring the image was successful.
84 * The valid sizes and formats depend on the source of the image data.
99 * ImageReaders} are more efficient to use when application access to image
136 "The image dimensions must be positive");
140 "Maximum outstanding image count must be at least 1");
189 * The default {@link ImageFormat image format} of {@link Image Images}.
211 * <p>An image is considered acquired after it's returned by a function from ImageReader, and
212 * until the Image is {@link Image#close closed} to release the image back to the ImageReader.
218 * enqueueing additional images may stall until at least one image has been released. </p>
232 * <p>Until valid image data is rendered into this {@link Surface}, the
247 * {@link Image images}. Returns {@code null} if no new image is available.
273 * @return latest frame of image data, or {@code null} if no image data is available.
277 Image image = acquireNextImage();
278 if (image == null) {
285 Image result = image;
286 image = null;
289 image.close();
290 image = next;
293 if (image != null) {
294 image.close();
312 * Attempts to acquire the next image from the underlying native implementation.
346 * no new image is available.
367 * @return a new frame of image data, or {@code null} if no image data is available.
372 // Initialize with reader format, but can be overwritten by native if the image
398 "This image was not produced by an ImageReader");
403 "This image was not produced by this ImageReader");
412 * Register a listener to be invoked when a new image becomes available
443 * Callback interface for being notified that a new image is available.
446 * The onImageAvailable is called per image basis, that is, callback fires for every new frame
452 * Callback that is called when a new image is available from ImageReader.
496 * Remove the ownership of this image from the ImageReader.
499 * After this call, the ImageReader no longer owns this image, and the image
502 * release the resources held by this image. For example, if the ownership
503 * of this image is transfered to an {@link ImageWriter}, the image will be
504 * freed by the ImageWriter after the image data consumption is done.
509 * reprocessing, where the application can select an output image from
510 * {@link ImageReader} and transfer this image directly to
511 * {@link ImageWriter}, where this image can be consumed by camera directly.
520 * @param image The image to be detached from this ImageReader.
521 * @throws IllegalStateException If the ImageReader or image have been
525 void detachImage(Image image) {
526 if (image == null) {
527 throw new IllegalArgumentException("input image must not be null");
529 if (!isImageOwnedbyMe(image)) {
530 throw new IllegalArgumentException("Trying to detach an image that is not owned by"
534 SurfaceImage si = (SurfaceImage) image;
541 nativeDetachImage(image);
584 private boolean isImageOwnedbyMe(Image image) {
585 if (!(image instanceof SurfaceImage)) {
588 SurfaceImage si = (SurfaceImage) image;
812 // Need null check first, as the getBuffer() may not be called before an image
844 // If this image is detached from the ImageReader.