Click here to Skip to main content
15,916,188 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
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 
All the gamma ramp or inv ramp does is stretch or compress the greyscale representation of the color range map.

So two simplest shapes you play with is exponential and 1-exponential graphs. A simple google of the two functions
will give you the formula and code for them. The above is an exponential hence the power function. Really you only
need the exponential form because 1-exp will give you the reverse code.

So if the above code works as you want 1 - (the exponential result) is the inverse it really is that simple as the
code result must be in the range between 0-1 you should be able to see why it inverts the graph. If you can't see
the logic google exp function and 1-exp function for the explaination.
In vino veritas

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 
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 
GeneralRe: Reference CalculateRamp - How to derive entry arguments from the existing Gamma Ramp Pin
Keith Davis5-Sep-16 19:55
Keith Davis5-Sep-16 19:55 
GeneralRe: Reference CalculateRamp - How to derive entry arguments from the existing Gamma Ramp Pin
Keith Davis8-Sep-16 9:31
Keith Davis8-Sep-16 9:31 
AnswerRe: Reference CalculateRamp - How to derive entry arguments from the existing Gamma Ramp - My Solution Pin
Keith Davis7-Sep-16 10:30
Keith Davis7-Sep-16 10:30 
QuestionPrinter Control Pin
Bram van Kampen27-Aug-16 15:38
Bram van Kampen27-Aug-16 15:38 
QuestionRe: Printer Control Pin
Richard MacCutchan27-Aug-16 20:31
mveRichard MacCutchan27-Aug-16 20:31 
AnswerRe: Printer Control Pin
Bram van Kampen28-Aug-16 14:20
Bram van Kampen28-Aug-16 14:20 
GeneralRe: Printer Control Pin
Richard MacCutchan28-Aug-16 20:56
mveRichard MacCutchan28-Aug-16 20:56 
GeneralRe: Printer Control Pin
Jochen Arndt28-Aug-16 21:38
professionalJochen Arndt28-Aug-16 21:38 
GeneralRe: Printer Control Pin
Richard MacCutchan28-Aug-16 22:03
mveRichard MacCutchan28-Aug-16 22:03 
GeneralRe: Printer Control Pin
Jochen Arndt28-Aug-16 22:09
professionalJochen Arndt28-Aug-16 22:09 
GeneralRe: Printer Control Pin
Richard MacCutchan28-Aug-16 22:19
mveRichard MacCutchan28-Aug-16 22:19 
GeneralRe: Printer Control Pin
Bram van Kampen1-Sep-16 13:37
Bram van Kampen1-Sep-16 13:37 
GeneralRe: Printer Control Pin
Richard MacCutchan1-Sep-16 23:37
mveRichard MacCutchan1-Sep-16 23:37 
GeneralRe: Printer Control Pin
Bram van Kampen4-Sep-16 15:24
Bram van Kampen4-Sep-16 15:24 
GeneralRe: Printer Control Pin
Bram van Kampen4-Sep-16 15:30
Bram van Kampen4-Sep-16 15:30 
GeneralRe: Printer Control Pin
Richard MacCutchan4-Sep-16 21:39
mveRichard MacCutchan4-Sep-16 21:39 
GeneralRe: Printer Control Pin
Bram van Kampen6-Sep-16 16:03
Bram van Kampen6-Sep-16 16:03 
GeneralRe: Printer Control Pin
Richard MacCutchan6-Sep-16 21:35
mveRichard MacCutchan6-Sep-16 21:35 

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.