I know that there is the jpeg
package for R that can deal with JPEG images. In my workflow, there is a step where I would like to downsample images while retaining their original pixel resolution.
For example, the following is a 640x480 JPEG I quickly made with GIMP:
I also saved a 320x240 version of it:
As you can see the 320x240 version is smaller and appears smaller, too.
However, is there a way to programmatically use the jpeg
package or another R package to "downsample" the image so that it stays 640x480 (or whatever its original pixel dimensions are) but do it so that it looks like the 320x240 version "zoomed in" to a 640x480 size?? (and yes that means it'll probably look pixellated)
Thank you!
EDIT: To be clear, I am not specifically talking about DPI-stuff. I am talking about downsampling but upsampling back to the original resolution. Which functions and packages can I use to achieve this?