#include "HxImageRep.h"
Go to the source code of this file.
Functions | |
| void L_HXIMAGEREP | HxExportByteData (HxImageRep img, HxByte *data) |
| Export image data to array of HxByte. More... | |
|
||||||||||||
|
Export image data to array of HxByte. The size of the (pre-allocated) array must be equal to the dimensionality of the pixel values times the number of pixels in the image.
00014 {
00015 HxString fname("HxExportByteData");
00016
00017 if (img.isNull())
00018 {
00019 HxGlobalError::instance()->reportError(fname, img.name(), "null image", HxGlobalError::HX_GE_INVALID);
00020 return;
00021 }
00022
00023 if (data == NULL)
00024 {
00025 HxGlobalError::instance()->reportError(fname, "null pointer", HxGlobalError::HX_GE_INVALID);
00026 return;
00027 }
00028
00029 HxTagList tags;
00030 HxString exportOp
00031 = HxString("exportPix<") + HxString(HxClassName<HxByte>()) + ">";
00032 HxAddTag(tags, "dataPtr", static_cast<void*>(data));
00033 img.exportOp(exportOp, tags);
00034 }
|
1.2.12 written by Dimitri van Heesch,
© 1997-2001