Design & Print: different containers for portrait/landscape orientation?

Started by rreyer, October 25, 2017, 09:29:15 AM

Previous topic - Next topic

rreyer

Hi,

for contact sheets I'd like to have different layouts for the containers in Design & Print.

The container shape is quadratic.
Landscape images should align to the top so that the bottom part is for text/info.
Portrait images should align to the left and the right part is for text/info.

Is that possible?

Thank you


Mario

You could use two containers sharing the same place.
Then show/hide the container depending on a variable, e.g comparing width to height to tell if a file is portrait or landscape.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

BanjoTom

A clever solution, Mario! I am continually impressed by the myriad possibilities of IMatch. .  .
— Tom, in Lexington, Kentucky, USA

Mario

-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook


sinus

Quote from: Mario on October 25, 2017, 10:55:29 AM
You could use two containers sharing the same place.
Then show/hide the container depending on a variable, e.g comparing width to height to tell if a file is portrait or landscape.

Yes, this show/hide possibility is great. I use it often for containers and even more for whole pages.
Best wishes from Switzerland! :-)
Markus

Mario

Just put two containers into the same grid cell. Then show/hide them using a variable to control the Hidden property.

{File.Width|numcomp:lt,{File.Height},1,0}

returns 1 for portrait and 0 for landscape, and

{File.Width|numcomp:lt,{File.Height},0,1}

the opposite.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

rreyer

Can it be that there is a bug that keeps the image container expression from working?
I'm getting always the same results as if it was reading the values only from the first image.

The expression for the text container works ok.

Mario

Not that I know of.
Do you use a dynamic or static template?
What is your expression? Did you try it in the Var Toy? ...
What's your container setup?

Just tried it with two containers in the same cell, different margins(bottom/top) and frame colors to check:



Did you consider the "consumes file" property?
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

rreyer

It is a dynamic template.

Here's an example:

Image1: Containers on the page

Expressions are:
Landscape Container: {File.Width|numcomp:lt,{File.Height},0,1}
Portrait Container: {File.Width|numcomp:lt,{File.Height},1,0}

The Text Containers carry the respective expression.

Image2: Result

It always chooses portrait orientation as in the first image.

EDIT: I've reversed the order and it always picks portrait orientation even if the first image is landscape.
EDIT: Var Toy says that this expression always returns a 0: {File.Width|numcomp:lt,{File.Height},1,0}
and that this one works: {File.MD.Exif::Main\274\Orientation\0|is:1,Landscape,Portrait}

rreyer

When I use that second expression:

{File.MD.Exif::Main\274\Orientation\0|is:1,1,0}

then the result goes nuts: image3
(I reversed the order, no effect of the expression)

Mario

As explained, I used

{File.Width|numcomp:lt,{File.Height},1,0}

for container 1 and the reversed

{File.Width|numcomp:lt,{File.Height},0,1}

for container 2.
Don't forget to reset the "consumes file" for the first container.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

rreyer


Mario

Works great here. Consumes must be off for the first container.
Send me your template and a list of the files (orientation) you use.
You are apparently combining multiple containers (image/text) and this may complicate matters.
Although D&P is awesome powerful, it cannot do everything...
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook