pixel Tcl_Obj* imageObj crimp_image* image; unsigned char* bytes; int length; if (crimp_get_image_from_obj (interp, imageObj, &image) != TCL_OK) { return TCL_ERROR; } bytes = image->pixel; length = image->w * image->h * image->itype->size; Tcl_SetObjResult (interp, Tcl_NewByteArrayObj (bytes, length)); return TCL_OK; /* vim: set sts=4 sw=4 tw=80 et ft=c: */ /* * Local Variables: * mode: c * c-basic-offset: 4 * fill-column: 78 * End: */