IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jan 23, 2009, 3:05:43 PM (17 years ago)
Author:
bills
Message:

Fixes to destreaking of raw images

Location:
trunk/magic/remove/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/magic/remove/src

    • Property svn:ignore
      •  

        old new  
        22streaksreplace
        33streakscompare
         4streaksrelease
  • trunk/magic/remove/src/Line.c

    r20664 r21156  
    321321                if (DistanceSquared (line, x, y) <= halfWidth2)
    322322                {
    323                     pixel = psAlloc (sizeof(PixelPos));
    324                     pixel->x = (int) x;
    325                     pixel->y = (int) y;
    326                     psArrayAdd (pixels, 1024, pixel);
    327                     psFree (pixel);
     323                    if (x >=0 && y >= 0) {
     324                        pixel = psAlloc (sizeof(PixelPos));
     325                        pixel->x = (unsigned int) x;
     326                        pixel->y = (unsigned int) y;
     327                        psArrayAdd (pixels, 1024, pixel);
     328                        psFree (pixel);
     329                    }
    328330                }
    329331            }
     
    368370                if (DistanceSquared (line, x, y) <= halfWidth2)
    369371                {
    370                     pixel = psAlloc (sizeof(PixelPos));
    371                     pixel->x = (int) x;
    372                     pixel->y = (int) y;
    373                     psArrayAdd (pixels, 1024, pixel);
    374                     psFree (pixel);
     372                    if (x >=0 && y >= 0) {
     373                        pixel = psAlloc (sizeof(PixelPos));
     374                        pixel->x = (unsigned int) x;
     375                        pixel->y = (unsigned int) y;
     376                        psArrayAdd (pixels, 1024, pixel);
     377                        psFree (pixel);
     378                    }
    375379                }
    376380            }
Note: See TracChangeset for help on using the changeset viewer.