我想從UIImage創建PIX數據結構。 PIX的結構:從UIImage創建Leptonica PIX結構
struct Pix
{
l_uint32 w; /* width in pixels */
l_uint32 h; /* height in pixels */
l_uint32 d; /* depth in bits */
l_uint32 wpl; /* 32-bit words/line */
l_uint32 refcount; /* reference count (1 if no clones) */
l_int32 xres; /* image res (ppi) in x direction */
/* (use 0 if unknown) */
l_int32 yres; /* image res (ppi) in y direction */
/* (use 0 if unknown) */
l_int32 informat; /* input file format, IFF_* */
char *text; /* text string associated with pix */
struct PixColormap *colormap; /* colormap (may be null) */
l_uint32 *data; /* the image data */
};
typedef struct Pix PIX;
struct PixColormap
{
void *array; /* colormap table (array of RGBA_QUAD) */
l_int32 depth; /* of pix (1, 2, 4 or 8 bpp) */
l_int32 nalloc; /* number of color entries allocated */
l_int32 n; /* number of color entries used */
};
如何在iOS中執行此操作?
不幸的是(對你而言),我對Leptonica一無所知。基於我對Core Graphics,C編程語言以及問題中的'struct'定義的瞭解,我能夠回答這個問題。 – 2013-06-15 00:53:44
好的,謝謝你的回覆。非常感激! – Teddy13 2013-06-15 01:14:55