Coding a new jpeg converter in #objective c