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(); |