So, well, I delved into Windows. Forms and figured out wtf you were typing about. Sort of. :) I still don't know what control is going to hold a Bitmap on a form. Oh wait, Image is the parent of Bitmap, I just cast it..there we go.
http://www.syncfusion.com/faq/windowsforms/faq_c3c.aspx has a lot of information. :) Sadly, all the code examples are in VB. Sigh. Anyhow, so, you set up three Trackbars, name them TR, TG, and TB, and then you want to slide them along and change the appropriate components of the colour. I get that. Is it an intensity thing? So a given pixel has an argb value of, lets say (37,128,128,128). And you want to...do what? :) It's odd from your code. What's the range on your trackbar? The colour values are going to be 0-255, right? So are you trying to invert it? Do you need ceilings on it? Is 'center' a zero value, or what? I can't imagine any sane values on the trackbar that will let you merely subtract a number between 0 and 255 from it, and still get a number from 0 to 255...hrm... argb = (x, 0,128,255) Tx.value can't be more than 255, or zero won't work again...so it has to end at most, at 255 Tx.Value can't be less than 255, or 255 won't work....so it has to start at most, at 255. I think you're in trouble. :) Now, if you make your bar range from -255 to 255, set it at zero in the middle....and put some limits on the transform....then it might work....Lessee, ticks every 255.... Hrm. Now it starts complaining that SetPixel can't be used on an indexed file. Fine. How do I fix that? Let's search 'setpixel indexed'...oh, many hits indeed. Let's just take the first one, from MSDN, and apply that....sigh, more VB. Looks simple enough, can I pretend and fix it....hey, you can't have an 8 bit nonIndexed format, odd... ewww, that's a horrid line : Graphics.FromImage(nonIndexed).DrawImage(fromFile,0,0). Must be legacy code. And it generates an out of memory exception. Time for some lunch, and some work. Back in a few. :) Yeah, when it works, I'll pastebin. G'on with ya now.
