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
 Save Image Problem

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
sungho Posted - Feb 11 2013 : 21:17:53
Hello.
And I have a question.

OS : Windows 7
C++ Builder XE
ImageEn v4.1.4

1. Load Image
2. change Whitevale, BlackValue
3. Save Change Image

Process 1, 2 is OK
Porcess 3 is not OK

Below Code
// OK
this->ImageEnView1->IO->LoadFromFileBMP("d:\\test.bmp");
// OK
ImageEnView1->Proc->Flip(fdHorizontal);
// save Flip image OK
this->ImageEnView1->IO->SaveToFile("d:\\test-hori.bmp");

// effect BlackValue, WhiteValue
this->ImageEnView1->IO->IEBitmap->BlackValue = 100;
this->ImageEnView1->IO->IEBitmap->WhiteValue = 20;
this->ImageEnView1->IO->Update();

// save image is before Flip image.
this->ImageEnView1->IO->SaveToFile("d:\\test-wh.bmp");

I want save adapt BlackValue/WhiteValue image.

Best Regards.
Thanks.

4   L A T E S T    R E P L I E S    (Newest First)
sungho Posted - Feb 12 2013 : 18:24:49
Thanks fast Reply.
Your suggest is correct.
Best Regards.
fab Posted - Feb 12 2013 : 14:24:16
BlackValue should be less than WhiteValue.
sungho Posted - Feb 12 2013 : 10:45:04
Thanks to fast reply.

Your suggest code execute result is full white image.
(View Screen and save result image file)
this->ImageEnView1->IO->IEBitmap->BlackValue = 100;
this->ImageEnView1->IO->IEBitmap->WhiteValue = 20;
this->ImageEnView1->IO->IEBitmap->StretchValues();
this->ImageEnView1->IO->Update();

Below code is good effect image.
(View Screen and not effect result image file)
this->ImageEnView1->IO->IEBitmap->BlackValue = 100;
this->ImageEnView1->IO->IEBitmap->WhiteValue = 20;
this->ImageEnView1->IO->Update();

OS : Windows7 Prof
C++ Builder Xe
ImageEn v4.1.4

Thanks
Best Regards.
fab Posted - Feb 12 2013 : 10:24:47
TIEBitmap.BlackValue and WhiteValue cannot be saved. They are "display-only" properties (like ChannelOffset and Contrast).
To make permanent changes to the image you have to call StretchValues after set BlackValue and WhiteValue.
Example:

this->ImageEnView1->IO->IEBitmap->BlackValue = 100;
this->ImageEnView1->IO->IEBitmap->WhiteValue = 20;
this->ImageEnView1->IO->IEBitmap->StretchValues();
this->ImageEnView1->IO->Update();