IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 26, 2008, 8:40:25 AM (18 years ago)
Author:
eugene
Message:

fix endpost errors in RemapXX.c

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/kapa2/src/Remap24.c

    r16256 r18324  
    8484
    8585    /**** fill in area to the left of the picture ****/
    86     for (jj = 0; (i_start > 0) && (jj < expand_out); jj++) {
     86    for (jj = 0; (i_start > 0) && (jj < expand_out) && (j + jj < dy); jj++) {
    8787      out_pix2 = out_pix + jj*(3*dx + extra);
    8888      for (i = 0; i < i_start; i++, out_pix2+=3) {
     
    108108        pixvalue3 = pixel3[*in_pix2];
    109109        out_pix2 = out_pix;
    110         for (jj = 0; jj < expand_out; jj++, out_pix2+=3*(dx-expand_out)+extra) {
     110        for (jj = 0; (jj < expand_out) && (j + jj < dy); jj++, out_pix2+=3*(dx-expand_out)+extra) {
    111111          for (ii = 0; ii < expand_out; ii++, out_pix2+=3) {
    112112            out_pix2[0] = pixvalue1;
     
    120120   
    121121    /**** fill in area to the right of the picture ****/
    122     for (jj = 0; jj < expand_out; jj++) {
     122    for (jj = 0; (jj < expand_out) && (j + jj < dy); jj++) {
     123      //    for (jj = 0; jj < expand_out; jj++) {
    123124      out_pix2 = out_pix + jj*(3*dx+extra);
    124125      for (i = i_end; i < dx; i++, out_pix2+=3) {
     
    142143
    143144  picture[0].pix = XCreateImage (graphic[0].display, graphic[0].visual, graphic[0].depth, ZPixmap, 0,
    144                                         picture[0].data, picture[0].dx, picture[0].dy, 32, 0);
     145                                 picture[0].data, picture[0].dx, picture[0].dy, 32, 0);
    145146
    146147  free (pixel1);
Note: See TracChangeset for help on using the changeset viewer.