![如何旋转带框的图像?](https://linux22.com/image/363180/%E5%A6%82%E4%BD%95%E6%97%8B%E8%BD%AC%E5%B8%A6%E6%A1%86%E7%9A%84%E5%9B%BE%E5%83%8F%EF%BC%9F.png)
如何旋转带框的图像?以下代码是否可以旋转不带框的图像?
谢谢
\documentclass[a4paper]{article}
\usepackage{graphicx}
\usepackage[export]{adjustbox}
\usepackage{tikz}
\usetikzlibrary{calc}
\usepackage{graphicx}
\begin{document}
\begin{titlepage}
\begin{tikzpicture}[overlay, remember picture]
\node[anchor=north west, %anchor is upper left corner of the graphic
xshift=8.5cm, %shifting around
yshift=-16cm]
at (current page.north west) %left upper corner of the page
{\includegraphics[
trim = {1 1 1 1}, clip,
width = 10.5cm,
rotate = 4,
angle = 0.35,
frame]{Image.png}};
\end{tikzpicture}
\end{titlepage}
\end{document}
答案1
传递的键是按顺序执行的*,因此frame
之前进行简单的改组trim
就足够了。
传递边距键纯粹是为了说明目的。您可以在最终版本中省略它。
\documentclass[a4paper]{article}
\usepackage{graphicx}
\usepackage[export]{adjustbox}
\usepackage{tikz}
\usetikzlibrary{calc}
\usepackage{graphicx}
\begin{document}
\begin{titlepage}
\begin{tikzpicture}[overlay, remember picture]
\node[anchor=north west, %anchor is upper left corner of the graphic
xshift=8.5cm, %shifting around
yshift=-16cm]
at (current page.north west) %left upper corner of the page
{\includegraphics[
margin = 1pt, % <------- Just to show the frame
frame, % <---------- Execute this first
trim = {1 1 1 1}, clip,
width = 10.5cm,
rotate = 4,
angle = 0.35
]{example-image}};
\end{tikzpicture}
\end{titlepage}
\end{document}
给出
*并非所有键都按顺序执行,trim
例如,始终对原始内容起作用。有关adjustbox
更多详细信息,请参阅文档。
答案2
也许rotatebox
可以使用简单的武器代替重型tikz
武器?
\documentclass[a4paper]{article}
\usepackage{graphicx}
\usepackage[export]{adjustbox}
\usepackage{tikz}
\usetikzlibrary{calc}
\usepackage{graphicx}
\begin{document}
\begin{titlepage}
{
\setlength{\fboxsep}{0pt}
\rotatebox{4}{%
\fbox{%
\includegraphics[%
trim = {1 1 1 1}, clip,
width = 10.5cm,
]{example-image}%
}%
}%
}
\end{titlepage}
\end{document}