Changeset 3683
- Timestamp:
- Apr 7, 2005, 2:27:03 PM (21 years ago)
- Location:
- trunk/stac/src
- Files:
-
- 1 added
- 2 edited
-
Makefile (modified) (2 diffs)
-
fixImage.c (added)
-
stacSize.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/stac/src/Makefile
r3673 r3683 15 15 SHIFTSIZE = shiftSize.o stacWrite.o stacConfig.o stacRead.o stacCheckMemory.o stacSize.o 16 16 17 TARGETS = stac shift combine shiftSize 17 FIXIMAGE = fixImage.o 18 19 TARGETS = stac shift combine shiftSize fixImage 18 20 19 21 .PHONY: tags clean empty test profile optimise all … … 33 35 shiftSize: $(SHIFTSIZE) 34 36 $(CC) $(CFLAGS) -o $@ $(SHIFTSIZE) $(LDFLAGS) $(OPTFLAGS) 37 38 fixImage: $(FIXIMAGE) 39 $(CC) $(CFLAGS) -o $@ $(FIXIMAGE) $(LDFLAGS) $(OPTFLAGS) 35 40 36 41 all: $(TARGETS) -
trunk/stac/src/stacSize.c
r3669 r3683 94 94 // Tweak the maps to account for the offset 95 95 if (xMapDiff != NULL) { 96 *xMapDiff = floor (xMin);96 *xMapDiff = floorf(xMin); 97 97 } 98 98 if (yMapDiff != NULL) { 99 *yMapDiff = floor (yMin);99 *yMapDiff = floorf(yMin); 100 100 } 101 101 for (int i = 0; i < nImages; i++) { 102 102 psPlaneTransform *map = maps->data[i]; // The map of interest 103 map->x->coeff[0][0] -= floor (xMin);104 map->y->coeff[0][0] -= floor (yMin);103 map->x->coeff[0][0] -= floorf(xMin); 104 map->y->coeff[0][0] -= floorf(yMin); 105 105 } 106 106 107 *outnx = (int) (xMax + 0.5) - (int)xMin;108 *outny = (int) (yMax + 0.5) - (int)yMin;107 *outnx = (int)ceilf(xMax - xMin); 108 *outny = (int)ceilf(yMax - yMin); 109 109 110 110 psTrace("stac.size", 1, "Output size is to be %dx%d\n", *outnx, *outny);
Note:
See TracChangeset
for help on using the changeset viewer.
