Support community for TTG plugins and products.
NOTICE
The Turning Gate's Community has moved to a new home, at https://discourse.theturninggate.net.
This forum is now closed, and exists here as a read-only archive.
You are not logged in.
Hello,
Currently on the photo legend in the viewer, I display the pixel dimensions of the photos like this:
"Dimensions: 5658 x 6880 px"
On the other hand is there a means/a method allowing to make an automatic calculation to display the resulting size at 300dpi in this way?:
"Dimensions: 5658 x 6880 px | 47,9 x 58,3 cm | 18,9 x 22,9 inches | 300dpi"
thank you in advance
Nico
Offline
So for recap:
Dimensions: 5658 x 6880 px | 47,9 x 58,3 cm | 18,9 x 22,9 inches | 300dpi
--> 5658/300 = 18,86 inches
--> 18,86 x 2,54 = 47,9 cm
should it work?
Native dimensions: {CroppedWidth} x {CroppedHeight}px | ({CroppedWidth}/300)*2.54 x ({CroppedHeight}/300)*2.54 cm | {CroppedWidth}/300 x {CroppedHeight}/300 inches | 300dpi
Last edited by Nico3939 (2020-04-28 22:28:02)
Offline
everything outside of the brackets is considered text and is printed as is.
You'd have to use LUA: http://backlight.theturninggate.net/doc … lua__token
But I don't know if LUA in Lightroom allows math functions (and I don't know what function it would be)
Rod
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site
Offline
This turned out more challenging as expected, although the result looks rather straightforward
Native dimensions: {CroppedWidth} x {CroppedHeight}px | {LUA= return math.floor(CroppedWidth/300*2.54)} x {LUA= return math.floor(CroppedHeight/300*2.54)} cm | {LUA= return math.floor(CroppedWidth/300)} x {LUA= return math.floor(CroppedHeight/300)} inches | 300dpi
Daniel Leu | Photography
DanielLeu.com
My digital playground (eg, Backlight tips&tricks): lab.DanielLeu.com
Offline
And this is with two decimal points:
Native dimensions: {CroppedWidth} x {CroppedHeight}px | {LUA= return string.format("%.2f",CroppedWidth/300*2.54)} x {LUA= return string.format("%.2f",CroppedHeight/300*2.54)} cm | {LUA= return string.format("%.2f",CroppedWidth/300)} x {LUA= return string.format("%.2f",CroppedHeight/300)} inches | 300dpi
Daniel Leu | Photography
DanielLeu.com
My digital playground (eg, Backlight tips&tricks): lab.DanielLeu.com
Offline
very cool Daniel. I got to learn something new today!!
Rod
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site
Offline
Amazing Daniel thank you very much it works great!
One last question, is it possible to do a Carriage return?
Last edited by Nico3939 (2020-04-29 05:02:25)
Offline
no. html cannot be used in caption fields.
Last edited by rod barbee (2020-04-29 04:26:56)
Rod
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site
Offline
Thanks Rod, but it seems we can make a line break in LUA by using "\n" or "\r"
But it don’t work or I forget something
Offline
I Googled about and saw that the \ character is not allowed in some platforms.
Rod
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site
Offline
very cool Daniel. I got to learn something new today!!
Yeah, me too
Daniel Leu | Photography
DanielLeu.com
My digital playground (eg, Backlight tips&tricks): lab.DanielLeu.com
Offline
Thanks Rod, but it seems we can make a line break in LUA by using "\n" or "\r"
But it don’t work or I forget something
I think this has to do with the internal processing of Lr, Backlight, and the display engine where line breaks can break the code.
Daniel Leu | Photography
DanielLeu.com
My digital playground (eg, Backlight tips&tricks): lab.DanielLeu.com
Offline
That is genius work, Daniel!
Well done!
Cheers,
Chumby
Offline