Replaced stb_image usage with libjpeg and stb_image_write usage with QImage