3 char evalstr[]="Description string of plugin dyntest - kind of like";
5 void null_plug(void *ptr) { }
7 /* Example dynamic filter - level stretch (linear) - note it only stretches and doesn't compress */
15 output pixel value calculated by: o=((i-a)*255)/(b-a);
17 note that since we do not have the needed functions to manipulate the data structures *** YET ***
24 if (in>255) { return 255; }
25 else if (in>0) return in;
29 void lin_stretch(i_img *im, int a, int b) {
36 /* fprintf(stderr,"parameters: (im 0x%x,a %d,b %d)\n",im,a,b);*/
41 for(y=0;y<im->ysize;y++) for(x=0;x<im->xsize;x++) {
42 i_gpix(im,x,y,&rcolor);
43 for(i=0;i<im->channels;i++) rcolor.channel[i]=saturate((255*(rcolor.channel[i]-a))/(b-a));
44 i_ppix(im,x,y,&rcolor);