How to change image dpi using compiled matlab code run on aws ec2?
Afficher commentaires plus anciens
I can generate an image with 300dpi using print function on my local matlab on a linux box (example code below), however on aws ec2 (ubuntu), the image is always saved as 72dpi with the same code no matter what dpi value I set. I am running Matlab 2014a with compiler version 5.1.
figure('paperunits','inches','paperposition',[0 0 6 6]);
n = 20;
cm = jet(n);
for i = 1:n
plot(ceil(i/4), mod((i-1),4)+1,'s','MarkerFaceColor',cm(i,:), 'markeredgecolor','k','markersize',30); hold on;
end
print('figure_dpng.png', '-dpng', '-r300');
2 commentaires
Walter Roberson
le 4 Sep 2015
It mght be worth testing export_fig from the file exchange.
Usha Duddu
le 8 Sep 2015
Are you launching your compiled application in 'nodisplay' mode?
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Video Formats and Interfaces dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!