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

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Error in SaveToFileTIFF?
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

supersk

99 Posts

Posted - Jun 09 2020 :  09:31:19  Show Profile  Reply
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:


xequte

38615 Posts

Posted - Jun 09 2020 :  17:15:18  Show Profile  Reply
Hi

Please email me for an update that fixes this.

Nigel
Xequte Software
www.imageen.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: