]> git.imager.perl.org - imager.git/blobdiff - DynTest/linstretch.c
avoid a possible sign-extension for offsets/sizes in SGI
[imager.git] / DynTest / linstretch.c
index 7d2d8faa12ef3f8b1d35d86dbd0ea542d1742caf..9f240ef524ccef292c8acf65d69a38e2a0ec9ece 100644 (file)
@@ -18,8 +18,8 @@ void null_plug(void *ptr) { }
 */
 
 
-unsigned char
 static
+unsigned char
 saturate(int in) {
   if (in>255) { return 255; }
   else if (in>0) return in;
@@ -29,14 +29,11 @@ saturate(int in) {
 void lin_stretch(i_img *im, int a, int b) {
 
   i_color rcolor;
-  int i,bytes,x,y;
-  int info[4];
+  i_img_dim x,y;
+  int i;
 
   
   /*   fprintf(stderr,"parameters: (im 0x%x,a %d,b %d)\n",im,a,b);*/
-  bytes=im->bytes;
-
-  i_img_info(im,info); 
  
   for(y=0;y<im->ysize;y++) for(x=0;x<im->xsize;x++) {
     i_gpix(im,x,y,&rcolor);