Made channel_cast_rescale() clamp to the floating-point channel range before rescaling, when converting from floating-point to integer types.  This avoids unexpected wrap-arounds.  One outstanding question is whether you want to preserve negative values if the destination is a signed type and the values are within range.  For now, we clamp them to zero.
Made channel_cast_rescale() clamp to the floating-point channel range before rescaling, when converting from floating-point to integer types.  This avoids unexpected wrap-arounds.  One outstanding question is whether you want to preserve negative values if the destination is a signed type and the values are within range.  For now, we clamp them to zero.


DougFirErickson/visionworkbench,DougFirErickson/visionworkbench,fengzhyuan/visionworkbench,fengzhyuan/visionworkbench,AveRapina/visionworkbench,DougFirErickson/visionworkbench,DougFirErickson/visionworkbench,fengzhyuan/visionworkbench,AveRapina/visionworkbench,AveRapina/visionworkbench,fengzhyuan/visionworkbench,fengzhyuan/visionworkbench,AveRapina/visionworkbench,DougFirErickson/visionworkbench,fengzhyuan/visionworkbench,AveRapina/visionworkbench,fengzhyuan/visionworkbench,AveRapina/visionworkbench,DougFirErickson/visionworkbench