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

조회 수: 16 (최근 30일)
MathWorks Support Team
MathWorks Support Team 2013년 10월 25일
편집: MathWorks Support Team 2020년 3월 16일
画像ファイルを保存する時、解像度を指定するにはどうすればよいですか?

채택된 답변

MathWorks Support Team
MathWorks Support Team 2020년 3월 16일
편집: 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!