Combine pngs and print out a figure with original quality

조회 수: 11 (최근 30일)
J T
J T 2021년 2월 11일
답변: Shravan Kumar Vankaramoni 2021년 3월 30일
Hello, I am using the following sample code to combine a series of png files, and attempted to print out in either png or pdf format, I hope to preserve the original quality of the individual figures, how should I do that? (for example, when I zoom in on the combined figure, I should be able to see the details of the individual figures clearly)
When I tried numbers larger than '-r1500' for png output, MATLAB doesn't let me do so because it's too large. Changing dpi doesn't seem to change anything for pdf format, and the pdf output is shrunk into a portrait page.
Note that the for loops are for specific ordering of the actual pngs I need to combine, you can replace it with any pngs for testing.
for i = 1:6
for j = 1:12
pngs{i,j} = 'foo.png';
end
end
out = imtile(pngs', 'Frames', 1:c, 'GridSize', [6 12]);
figure;
imshow(out);
print(gcf, 'bigfoo.png', '-dpng', '-r1500');
print(gcf, 'bigfoo.png', '-dpdf','-bestfit','-r4000');
Any help is appreciated!

답변 (1개)

Shravan Kumar Vankaramoni
Shravan Kumar Vankaramoni 2021년 3월 30일

카테고리

Help CenterFile Exchange에서 Annotations에 대해 자세히 알아보기

태그

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by