change mmap to jpg