画像ファイルを保存す​る時、解像度を指定す​るにはどうすればよい​ですか?

18 次查看(过去 30 天)
MathWorks Support Team
画像ファイルを保存する時、解像度を指定するにはどうすればよいですか?

采纳的回答

MathWorks Support Team
编辑:MathWorks Support Team 2020-3-16
次のように、print関数の -r オプションを使用します。
plot(sin(0:0.1:2*pi))
print(gcf,'-djpeg','-r300','output1.jpg')
なお、解像度を変更すると保存した画像の大きさが画面上のFigureのサイズと異なります。画面上の Figureと同じサイズで保存する場合は、 -r0 オプションを使用します。その際、'PaperPositionMode'プロパティを'Auto'に設定しておきます。
set(gcf,'PaperPositionMode','Auto')
print(gcf,'-djpeg','-r0','output2.jpg')
注意
解像度を指定できるのは、PostScript、GhostScript、Tiff、Jpegのみとなります。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Read, Write, and Modify Image 的更多信息

产品


版本

R2007b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!