some fixes

adding image resampling support