fixed bezier sampling size mismatch when forces samples are too close to the end of the curve
better file extension checking for image read