# NOT RUN {
jpegfile=system.file("img", "Rlogo.jpg", package="jpeg")
image_type(jpegfile)
jpeg_pretending_to_be_png=tempfile(fileext = '.png')
file.copy(jpegfile, jpeg_pretending_to_be_png)
image_type(jpeg_pretending_to_be_png)
unlink(jpeg_pretending_to_be_png)
# }
Run the code above in your browser using DataLab