Click here to Skip to main content
15,894,410 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: vc630 vending machines Pin
NotPolitcallyCorrect11-Sep-16 8:08
NotPolitcallyCorrect11-Sep-16 8:08 
AnswerRe: vc630 vending machines Pin
Chris Losinger12-Sep-16 4:19
professionalChris Losinger12-Sep-16 4:19 
JokeRe: vc630 vending machines Pin
enhzflep12-Sep-16 14:22
enhzflep12-Sep-16 14:22 
AnswerRe: vc630 vending machines Pin
Patrice T14-Sep-16 8:21
mvePatrice T14-Sep-16 8:21 
QuestionHow to fix the invalide pointer problem Pin
yu-jian8-Sep-16 17:43
yu-jian8-Sep-16 17:43 
AnswerRe: How to fix the invalide pointer problem Pin
leon de boer8-Sep-16 19:03
leon de boer8-Sep-16 19:03 
AnswerRe: How to fix the invalide pointer problem Pin
CDP18028-Sep-16 19:08
CDP18028-Sep-16 19:08 
AnswerRe: How to fix the invalide pointer problem Pin
Saravanan Sundaresan24-Sep-16 19:55
professionalSaravanan Sundaresan24-Sep-16 19:55 
QuestionHow do you read / use this code? Pin
Vaclav_8-Sep-16 7:40
Vaclav_8-Sep-16 7:40 
AnswerRe: How do you read / use this code? Pin
NotPolitcallyCorrect8-Sep-16 7:58
NotPolitcallyCorrect8-Sep-16 7:58 
GeneralRe: How do you read / use this code? Pin
Vaclav_8-Sep-16 10:16
Vaclav_8-Sep-16 10:16 
AnswerRe: How do you read / use this code? Pin
Bram van Kampen8-Sep-16 14:40
Bram van Kampen8-Sep-16 14:40 
AnswerRe: How do you read / use this code? Pin
leon de boer8-Sep-16 17:26
leon de boer8-Sep-16 17:26 
GeneralSOLVED Re: How do you read / use this code? Pin
Vaclav_9-Sep-16 18:23
Vaclav_9-Sep-16 18:23 
QuestionReference CalculateRamp - How to derive entry arguments from the existing Gamma Ramp - My best solution Pin
Keith Davis3-Sep-16 6:28
Keith Davis3-Sep-16 6:28 
QuestionRe: Reference CalculateRamp - How to derive entry arguments from the existing Gamma Ramp Pin
Richard MacCutchan3-Sep-16 6:36
mveRichard MacCutchan3-Sep-16 6:36 
AnswerRe: Reference CalculateRamp - How to derive entry arguments from the existing Gamma Ramp Pin
Keith Davis3-Sep-16 6:47
Keith Davis3-Sep-16 6:47 
AnswerRe: Reference CalculateRamp - How to derive entry arguments from the existing Gamma Ramp Pin
Keith Davis3-Sep-16 7:11
Keith Davis3-Sep-16 7:11 
AnswerRe: Reference CalculateRamp - How to derive entry arguments from the existing Gamma Ramp Pin
leon de boer4-Sep-16 3:54
leon de boer4-Sep-16 3:54 
GeneralRe: Reference CalculateRamp - How to derive entry arguments from the existing Gamma Ramp Pin
Keith Davis4-Sep-16 9:10
Keith Davis4-Sep-16 9:10 
GeneralRe: Reference CalculateRamp - How to derive entry arguments from the existing Gamma Ramp Pin
leon de boer4-Sep-16 22:36
leon de boer4-Sep-16 22:36 
GeneralRe: Reference CalculateRamp - How to derive entry arguments from the existing Gamma Ramp Pin
Keith Davis5-Sep-16 4:38
Keith Davis5-Sep-16 4:38 
Hi Leon,

I took a good look at the code and the web site that you suggested, and I find it interesting. That said, I don't think it applies to my application. If I'm not mistaken, your suggested code would be something that you might use for adjusting the gamma of a photo.

The algorithm that I have put forward is actually easy to control with either four slider controls, or four updown/edit controls that will affect the graphics card for your display monitor. One control for each of the following Brightness, Contrast, Level, and Brightness.

Allow me to explain the goals that I need to achieve here in my application:

I am working on a Navigation Display where there are strict specifications for color and brightness calibration in three viewing modes: Daytime, Twilight, and Night. In this application I also make calls to GetSysColors and SetSysColors to change the over all appearance of the Windows display for Day, Twilight, and Night. The specifications also call for three specific cursors that each have to meet strict size and color requirements for each display mode. There are numerous color checks involved, as well as a grey scale display check that must appear ever time the user switches to the night time display settings (and on demand).

These specifications are laid out in the the International Hydrographic Organizations (IHO) Presentation Library for ECDIS which uses the S-57 Electronic Navigation Chart (ENC) display.

For the twilight and night time display modes it is critical that mariner's night vision be preserved, and that optimum view-ability be achieved under bright sunlight conditions.

The grey scale check that is required consist of a black box with a slightly lighter shaded box inside for which the user must be able to calibrate his display so that the lighter shaded box can be easily differentiated from the black box background. The algorithm above serves these calibration purposes.

I have used this algorithm for a number of years to adjust my own display for less eye strain when I'm spending hours at a time writing code - sometimes in a night time environment (on the ship's bridge). Because of the my inability to derive the Brightness Contrast, Level, and Gamma settings directly from the Gamma Ramp array, I have not employed this method in any of my software releases.

Thus far the best I have been able to do is iterate through all possible settings until the output matches the Graphics Card's Gamma Ramp array received through the GetDeviceGammaRamp call. This works but it takes about 49,000,000 iterations and runs for 15-20 minutes. I have applied some variations to this which has shortened the run time; but it still takes about 5 minutes to run it. I need to be able to derive these settings in about a one second. I haven't given up yet thoughSmile | :)

I hope this helps to better explain my goals.

Again, thank you for your interest and your suggestions; it is much appreciated!

Best regards.
GeneralRe: Reference CalculateRamp - How to derive entry arguments from the existing Gamma Ramp Pin
leon de boer5-Sep-16 6:06
leon de boer5-Sep-16 6:06 
GeneralRe: Reference CalculateRamp - How to derive entry arguments from the existing Gamma Ramp Pin
Keith Davis5-Sep-16 8:23
Keith Davis5-Sep-16 8:23 
GeneralRe: Reference CalculateRamp - How to derive entry arguments from the existing Gamma Ramp Pin
leon de boer5-Sep-16 18:55
leon de boer5-Sep-16 18:55 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.