Fixed memory leak in padImage, floatArray2cvImage remains broken.