Table of Contents

Class Image

Espacio de nombres
easyar
Ensayo
EasyAR.Sense.dll

Image almacena datos de imagen y se usa para representar una image en memoria. Image proporciona acceso a los datos sin procesar como un byte array, y también proporciona interfaces para acceder a información como width/height. En todas las versiones de EasyAR Sense, puede acceder a los datos de imagen. En iOS, puede acceder así :: #import #import easyar_OutputFrame * outputFrame = [outputFrameBuffer peek]; if (outputFrame != nil) { easyar_Image * i = [[outputFrame inputFrame] image]; easyar_Buffer * b = [i buffer]; char * bytes = calloc([b size], 1); memcpy(bytes, [b data], [b size]); // use bytes here free(bytes); } En Android, :: import cn.easyar.*; OutputFrame outputFrame = outputFrameBuffer.peek(); if (outputFrame != null) { InputFrame inputFrame = outputFrame.inputFrame(); Image i = inputFrame.image(); Buffer b = i.buffer(); byte[] bytes = new byte[b.size()]; b.copyToByteArray(0, bytes, 0, bytes.length); // use bytes here b.dispose(); i.dispose(); inputFrame.dispose(); outputFrame.dispose(); }

public class Image : RefBase, IDisposable
Herencia
Image
Implementa
Miembros heredados

Métodos

Clone()

public Image Clone()

buffer()

Devuelve el data buffer en la image. La API `Buffer`_ puede usarse para acceder a los datos internos. El contenido del `Buffer`_ obtenido no debe modificarse, porque puede estar usándose en otros threads.

public virtual Buffer buffer()

create(Buffer, PixelFormat, int, int, int, int)

public static Image create(Buffer buffer, PixelFormat format, int width, int height, int pixelWidth, int pixelHeight)

Parámetros

buffer
format
width
height
pixelWidth
pixelHeight

format()

Devuelve el formato de image.

public virtual PixelFormat format()

height()

Devuelve la altura de image. Habrá pixelHeight - height píxeles de padding debajo de los datos de image.

public virtual int height()

pixelHeight()

Devuelve el pixel height usado al codificar la image.

public virtual int pixelHeight()

pixelWidth()

Devuelve el pixel width usado al codificar la image.

public virtual int pixelWidth()

width()

Devuelve el ancho de image. Habrá pixelWidth - width píxeles de padding a la derecha de los datos de image.

public virtual int width()