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:TImageEnProc.ConvertTo
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

supersk

100 Posts

Posted - Jan 06 2025 :  01:58:00  Show Profile  Reply
the code as following:
imgenvImport->IO->NativePixelFormat = true; // Use the original pixel format
imgenvImport->IO->LoadFromFileAuto(ImgFileName);
imgenvtmp->Assign(imgenvImport);
imgenvtmp->Proc->ConvertTo(ie16g);
imgenvtmp->IO->SaveToFileTIFF("D:\\tetst.tif");

The above code is designed to load a colored PNG image and convert it into a 16-bit grayscale TIFF image. However, the resulting image is a 48-bit TIFF image. Therefore, how can we convert a color image into a 16-bit grayscale TIFF image?

xequte

38706 Posts

Posted - Jan 06 2025 :  13:56:33  Show Profile  Reply
Hi

Does enabling AutoSetBitDepth affect it?

http://www.imageen.com/help/TIEGlobalSettings.AutoSetBitDepth.html

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