I am using the \includegraphics command to load images. Some images are portrait orientation and some are landscape, so I am using the width, height, and keepaspectratio arguments to keep the image within the text area:
\includegraphics[width=\textwidth, height=\textheight, keepaspectratio=true]{image_name}
Can I somehow get return values so I know what the resulting image width and height are? If yes, then how can I use the values in conditional logic within my tex document? Specifically, if the image is portrait and the scaled width is less than some percentage (say 60%) of \textwidth, then I would like to create a minipage to hold the image, then another minipage to hold some text. The result would be image on the left and text on the right (or vise versa).
Graphics, Figures & Tables ⇒ result of keepaspectratio?
NEW: TikZ book now 40% off at Amazon.com for a short time.
