When an image's length is scaled to a variable length, say
\textwidth, how can I determine the effective scaling factor?
I would like to use it to apply the same scaling to another image:
As a workaround, it would be sufficient for me to print the effective scaling factor and manually insert it in the second command. This could be done by determining the original image's lengths as seen by pdflatex and dividing
\the\textwidth by it. Is this possible? How does trimming affect this?