画像ファイルを保存する時、解像度を指定するにはどうすればよいですか?
35 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
MathWorks Support Team
el 25 de Oct. de 2013
Editada: MathWorks Support Team
el 16 de Mzo. de 2020
画像ファイルを保存する時、解像度を指定するにはどうすればよいですか?
Respuesta aceptada
MathWorks Support Team
el 16 de Mzo. de 2020
Editada: MathWorks Support Team
el 16 de Mzo. de 2020
次のように、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 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Read, Write, and Modify Image en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!