2001.02.20 16:08 "need help", by Chakravarthy Terlapu

2001.02.20 16:08 "need help", by Chakravarthy Terlapu


I have a image called street.tif and 2 boxes whose coordinates are for example as follows;

frc[i].lx = x1;   //left x-coordinate
frc[i].ly = y1;   //left y-coordinate
frc[i].tx = x2;   //top x-coordinate
frc[i].ty = y2;   //top y-coordinate
frc[i].rx = x3;   //right x-coordinate
frc[i].ry = y3;   //right y-coordinate
frc[i].bx = x4;   //bottom x-coordinate
frc[i].by = y4;   //bottom y-coordinate

frc[i].lx = x11;
frc[i].ly = y11;
frc[i].tx = x22;
frc[i].ty = y22;
frc[i].rx = x33;
frc[i].ry = y33;
frc[i].bx = x44;
frc[i].by = y44;

I need to create a new image say street1.tif which contains street.tif - boxes i.e I have to erase all pixels within the box1 and box2.

It would be great if anyone could help me.

Chakravarthy Terlapu

 #include "tiffio.h"
 #include <stdio.h>

  int i,j,k;
  unsigned short t;
  int linebytes, outbytes;
  uint32 w,h;
  uint32 row;
  unsigned char *inbuf,*outbuf;

  TIFF* in;
  TIFF* out;






   for(row=0; row<h; i++)
     TIFFReadScanline(in, inbuf, row, 0);

     //Here how can I do the processing of removing the pixels within the box

     TIFFWriteScanline(out, inbuf, row, 0 );