“有意随机旋转图形”的附加问题

“有意随机旋转图形”的附加问题

几天前,我问了一个关于随机旋转人物的问题,用户“Skillmon”给出了一个很好的答案:有意随机旋转图形 现在我想更进一步:我想创建一个图片库,使其包含 3 列,并且我希望图像可以随机旋转。这是我的 MWE:

\documentclass[ngerman,german,14pt,twoside,openany]{scrbook}
\usepackage[left=2.5cm,right=2.5cm,top=2cm,bottom=2.5cm]{geometry}
\usepackage[ngerman]{babel}
\usepackage[utf8]{inputenc}
\usepackage{rotating, graphicx}
\usepackage{graphicx}
\usepackage{tikz}
\usepackage{tikz-timing}
\usepackage{makecell, tabularx, multirow}
\usepackage{multirow,hhline,graphicx,array}

%https://tex.stackexchange.com/questions/696930/intended-random-rotation-of-figures
\ExplSyntaxOn
\cs_new:Npn \random { \int_rand:nn {-10} {10} }
\cs_new:Npn \randomsize { \int_rand:nn {3} {6} }
\ExplSyntaxOff

\begin{document}

\begin{center}
   \foreach \s in {1,...,200}{%
       %\IfFileExists{DATEINAME}{DANN-TEIL}{SONST-TEIL}
        \IfFileExists{D:/folder1/folder2/pictures\s.jpg}%
 {\begin{tikzpicture}%
  \def\ig{%
   \includegraphics[width=.245\textwidth,keepaspectratio,angle=\random]{D:/folder1/folder2/pictures\s.jpg}
   }%
 \node [inner sep=0pt](mypicture) at (0,0) {\phantom{\ig}};%
 \clip[rounded corners=0mm] ($(mypicture.south west)+(1mm,1mm)$) rectangle ($(mypicture.north east)-(1mm,1mm)$);%
 \node[inner sep=0pt](mypicture) at (0,0) {\ig};%
\end{tikzpicture}
}}
\end{center}
\end{document}

一切都很好,除了图片的角被切掉了,我不喜欢这样。有人能解释一下如何解决这个问题吗?提前谢谢!

相关内容