\includegraphics를 사용하여 이미지별로 DPI를 명시적으로 설정할 수 있나요?

\includegraphics를 사용하여 이미지별로 DPI를 명시적으로 설정할 수 있나요?

\includegraphics내 문서에 (또는 다른 유사한 것) 포함하고 싶은 이미지가 여러 개 있습니다 .

문제는 사례별로 특정 이미지의 DPI를 명시적으로 재정의하고 싶다는 것입니다.

즉, 다음과 같은 작업을 수행하고 싶습니다.

\newcommand{\smalldpi}{100}
\newcommand{\largedpi}{600}

\includegraphics{foo.png}% default DPI seems to be fine for this one
\includeapicture[dpi=\smalldpi]{bar.png}
\includeapicture[dpi=\largedpi]{baz.png}

이 문서DPI에 대해 전혀 언급하지 않는 것 같습니다.

픽셀 크기와 특정 DPI를 통해 이미지의 물리적 크기를 어떻게 결정할 수 있나요?

답변1

사용하는 솔루션pdfTeX원시적이고매크로:

전문에서:

\newcommand{\includegraphicsdpi}[3]{
    \pdfimageresolution=#1  % Change the dpi of images
    \includegraphics[#2]{#3}
    \pdfimageresolution=72  % Change it back to the default
}

문서에서:

\includegraphicsdpi{300}{}{figures/rpi/app_main}

기존 솔루션: 저는 Texlive 2016을 사용하여 정확히 이 작업을 수행하곤 했습니다. \includegraphics[resolution=300]{bar.png}어쩌면 그것이 당신에게 적합할 수도 있습니다. 최근 Texlive를 업데이트했는데 작동이 멈췄습니다. Package keyval Error: resolution undefined.그것에 대해 별도의 질문을 받고 ,여기.

관련 정보