works like the gif creator but for jpegs