Click here to Skip to main content
15,911,786 members
Home / Discussions / C#
   

C#

 
GeneralHelp me please ! Pin
Vo Tan Tai29-May-04 18:28
Vo Tan Tai29-May-04 18:28 
GeneralRe: Help me please ! Pin
Mazdak29-May-04 20:21
Mazdak29-May-04 20:21 
GeneralRe: ListBox Pin
myNameIsRon29-May-04 16:35
myNameIsRon29-May-04 16:35 
GeneralRe: ListBox Pin
Meysam Mahfouzi29-May-04 16:55
Meysam Mahfouzi29-May-04 16:55 
GeneralRe: ListBox Pin
myNameIsRon1-Jun-04 10:38
myNameIsRon1-Jun-04 10:38 
GeneralBitmap PixelFormat GetPixel Pin
Dave12345629-May-04 14:47
Dave12345629-May-04 14:47 
GeneralRe: Bitmap PixelFormat GetPixel Pin
Dave Kreskowiak29-May-04 15:03
mveDave Kreskowiak29-May-04 15:03 
GeneralRe: Bitmap PixelFormat GetPixel Pin
Dave12345629-May-04 22:51
Dave12345629-May-04 22:51 
Fantastic, this has really helped. Thanks very much! Smile | :)

As a side note, my TIFF files were originally recorded by a camera that is built for the scientific community. Unlike most commercial cameras, this camera does not automatically transform the amount of photons it collects on each pixel (this transformation is similar to a gamma correction). After I applied the solution you suggested, I found that my numbers were systematically off. I had to correct my numbers by the following transform...

[R G B] is what I get from Bitmap.GetPixel
[r g b] is what I got from the unsafe code that I executed.

R = 2.5 * r^(1/2.4) - 0.056
G = 2.5 * g^(1/2.4) - 0.056
B = 2.5 * b^(1/2.4) - 0.056

Applying this transform reduced by Mean-Squared-Error per pixel to about 10^-7.

It seems liike the tags inside of the TIFF file recorded the fact that a transform had not been applied, so GDI+ does the transform automatically when creating the Bitmap object. Add that to the list of things that GDI+ does without us knowing!

Dave
GeneralRe: Bitmap PixelFormat GetPixel Pin
Dave Kreskowiak30-May-04 3:06
mveDave Kreskowiak30-May-04 3:06 
GeneralRe: Bitmap PixelFormat GetPixel Pin
Dave12345630-May-04 4:45
Dave12345630-May-04 4:45 
GeneralRe: Bitmap PixelFormat GetPixel Pin
Dave1234564-Jun-04 8:13
Dave1234564-Jun-04 8:13 
GeneralRe: Bitmap PixelFormat GetPixel Pin
Dave1234564-Jun-04 8:22
Dave1234564-Jun-04 8:22 
GeneralRSS reader help Pin
MeterMan29-May-04 14:02
MeterMan29-May-04 14:02 
GeneralRe: RSS reader help Pin
MeterMan30-May-04 8:11
MeterMan30-May-04 8:11 
GeneralTreeView.text Pin
Ammar Ben Hadj Amor29-May-04 10:35
professionalAmmar Ben Hadj Amor29-May-04 10:35 
GeneralRe: TreeView.text Pin
Aaron Eldreth29-May-04 11:04
Aaron Eldreth29-May-04 11:04 
GeneralFrom double to Date Pin
Christer Claesson29-May-04 7:03
Christer Claesson29-May-04 7:03 
GeneralRe: From double to Date Pin
Mazdak29-May-04 10:22
Mazdak29-May-04 10:22 
GeneralRe: From double to Date Pin
Dave Kreskowiak29-May-04 14:48
mveDave Kreskowiak29-May-04 14:48 
GeneralRe: From double to Date Pin
Anonymous30-May-04 0:22
Anonymous30-May-04 0:22 
GeneralExecutable Pin
garyellis529-May-04 6:30
garyellis529-May-04 6:30 
GeneralRe: Executable Pin
Nnamdi Onyeyiri29-May-04 9:01
Nnamdi Onyeyiri29-May-04 9:01 
GeneralBinary Resource Pin
Chernobog_29-May-04 2:43
Chernobog_29-May-04 2:43 
GeneralA question about move PictureBox Pin
Member 94012528-May-04 21:39
Member 94012528-May-04 21:39 
GeneralRe: A question about move PictureBox Pin
Aaron Eldreth29-May-04 3:01
Aaron Eldreth29-May-04 3:01 

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.