Changeset 4215 for trunk/psphot/src/psphot-utils.c
- Timestamp:
- Jun 11, 2005, 5:43:47 AM (21 years ago)
- File:
-
- 1 edited
-
trunk/psphot/src/psphot-utils.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psphot/src/psphot-utils.c
r4114 r4215 160 160 } 161 161 162 // mask the area contained by the region 163 void psImageMaskRegion (psImage *image, psRegion *region, int maskValue) { 164 165 for (int iy = 0; iy < image->numRows; iy++) { 166 for (int ix = 0; ix < image->numCols; ix++) { 167 if (ix + image->col0 < region->x0) continue; 168 if (ix + image->col0 >= region->x1) continue; 169 if (iy + image->row0 < region->y0) continue; 170 if (iy + image->row0 >= region->y1) continue; 171 image->data.U8[iy][ix] |= maskValue; 172 } 173 } 174 } 175 176 // mask the area not contained by the region 177 void psImageKeepRegion (psImage *image, psRegion *region, int maskValue) { 178 179 for (int iy = 0; iy < image->numRows; iy++) { 180 for (int ix = 0; ix < image->numCols; ix++) { 181 if (ix + image->col0 < region->x0) goto maskit; 182 if (ix + image->col0 >= region->x1) goto maskit; 183 if (iy + image->row0 < region->y0) goto maskit; 184 if (iy + image->row0 >= region->y1) goto maskit; 185 continue; 186 maskit: 187 image->data.U8[iy][ix] |= maskValue; 188 } 189 } 190 } 191 162 192 // create a subset of sources for the PS_SOURCE_PSFSTAR entries 163 193 // XXX deprecated
Note:
See TracChangeset
for help on using the changeset viewer.
