c# - Using trackbar to adjust color filter of an image -


i m trying wat title above says m there no change on pic when scroll trackbar. noe there sth missing in code ... can me out ? appreciate it.

private void settrackbarprop()     {         trackbar1.maximum = 255;         trackbar1.minimum = 0;         trackbar1.tickfrequency = 1;     }      private bitmap applyrgbfilter(bitmap pic2)     {         colorfiltering filter = new colorfiltering();         filter.red = new intrange(0, red);         filter.blue = new intrange(0, blue);         filter.green = new intrange(0, green);         bitmap processedimage = filter.apply(pic2);         return processedimage;     }      void picturebox2(object sender, painteventargs e)     {          picturebox2.image = applyrgbfilter(pic2);     }       private void trackbar1_scroll(object sender, eventargs e)     {         red = trackbar1.value;     } 

above snippet of code on filtering part, "pic2" image can browsed computer browse button had in application. picturebox2 place pic2 appear. lot in advance !

it not clear header files colorfiltering function. drawback of program note of header files.


Comments

Popular posts from this blog

Add email recipient to all new Trac tickets -

400 Bad Request on Apache/PHP AddHandler wrapper -

php - Change action and image src url's with jQuery -