fix bug #1 and #2
convert jpeg smooth