added options; fixed a glitch with possible negative TGA sizes