pixel color changing



  • Hello!

    I have got an image and I want to change the value of his pixels and paste it into another image.
    pixel(r,c): is actual pixel
    b: changes from 0 to undetermined number, for example 100.
    The problem comes for example when b=2;I think that the method doesn't understand the conversion FromArgb

    System::Drawing::Color val;
    	val.FromArgb(b);
    	labelledImage->SetPixel(r,c,val);
    

    Has anyone of you a solution for that problem or another idea so I can change the values of the pixels??

    Thank you in advanced!



  • Hello,

    The problem comes for example when b=2;

    Which problem? Can you specify it?

    In the code I don't see where you use the converted val, maybe this:

    labelledImage->SetPixel(r, c, System::Drawing::Color::FromArgb(b));
    

    solves the problem...

    with kind regards,

    Probe-Nutzer


Anmelden zum Antworten