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
 Save image after changing channel offset
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

zhengyuanyi27

58 Posts

Posted - Apr 29 2021 :  06:20:38  Show Profile  Reply
I loaded one image into Imageenvect1 and changed the channel offset of Imageenvect1, such as set the red channel to 0 using the following codes:
ImageEnVect1.IEBitmap.ChannelOffset[0] := 0;

Then I saved the image using the following codes:
imageenvect1.IO.SaveToFile('d:\1.jpg' );
While I found the saved image (1.jpg) still keep the red channel.

Then I tried the following code which still didn't work.
imageenvect1.IEBitmap.CopyToTBitmap(imageenvect2.Bitmap);
imageenvect2.IO.SaveToFile('d:\1.jpg' )

Could somebody tell me how to save an image with changed channel offset?

Thanks a lot!

zhengyuanyi27

58 Posts

Posted - Apr 29 2021 :  11:07:58  Show Profile  Reply
I figure it out by adding the following codes:
ImageEnvect1.IEBitmap.FixChannelOffset;
ImageEnvect1.IEBitmap.FixContrast;
Go to Top of Page

xequte

38127 Posts

Posted - Apr 29 2021 :  19:24:09  Show Profile  Reply
Yes, that is the correct way:

https://www.imageen.com/help/TIEBitmap.ChannelOffset.html
https://www.imageen.com/help/TIEBitmap.Contrast.html

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