ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Error in SaveToFileTIFF?

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
supersk Posted - Jun 09 2020 : 09:31:19
I want to save an array to an image as TIFF, The code as follow
imgConvert->IEBitmap->Height = ImgHeight;
imgConvert->IEBitmap->Width = ImgWidth;
imgConvert->LegacyBitmap = false; // Do not use TBitmap
// imgConvert->IEBitmap->Location = ieFile;

imgConvert->IEBitmap->PixelFormat = ie32f;
imgConvert->IO->Params->BitsPerSample = 32;
imgConvert->IO->Params->SamplesPerPixel = 1;
imgConvert->IO->Params->TIFF_PhotometInterpret = ioTIFF_BLACKISZERO;
imgConvert->IO->Params->TIFF_Compression = ioTIFF_UNCOMPRESSED;

float *P32;
for (int i = 0; i < ImgHeight; i++) {
P32 = (float*)imgConvert->IEBitmap->Scanline[i];
for (int j = 0; j < ImgWidth; j++) {
P32[j] = IctData[i*ImgWidth + j] /255.0;
}
}
imgConvert->IO->SaveToFileTIFF(OutputFilename);
The code can compile successfully, but run to SaveToFileTIFF, the error will occur as follow:


1   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Jun 09 2020 : 17:15:18
Hi

Please email me for an update that fixes this.

Nigel
Xequte Software
www.imageen.com