I am using the print function to save figures containing large images (geographical data) as jpg or tif images:
figure(1); imagesc(My_image); print('-r600', '-djpeg', '-f1', 'My_image.jpg');
This used to work perfectly for years with previous Matlab versions. Now with Matlab 2014b, the image keeps the screen resolution whatever dpi (here 600) number is chosen: the number of pixel is behaving as expected, but the image itself keeps the same pixels as displayed on the screen, resulting only in very large squares (pixels) when using large dpi numbers. To be clear: the image is simply not resampled according to the dpi number, as it should be. The other figure information such as axes, text, colorbar, ... are behaving correctly.
I tried to change the renderer, it did not change anything.
I tested the exact same code on Matlab 2014a and it worked perfectly there: the image resolution followed the selected dpi number. I tested it on another computer and had the same issue with Matlab 2014b.
What is going on? How can I save my figures with the appropriate resolution?