Page 1 of 1

Visual filter - orientation

Posted: 13 Aug 2015 15:58
by mkolaski
Hi

Is it possible to filter the view based on whether images are portrait or landscape orientation?

Thanks,
Mick

Re: Visual filter - orientation

Posted: 13 Aug 2015 16:18
by highend
Afaik: No.

One "workaround". A report / folderreport combined with a paper folder. Although it's not live...

Re: Visual filter - orientation

Posted: 13 Aug 2015 16:24
by mkolaski
Could you give me more details on how to achieve this please as I'm not really sure what would be involved.
Alternatively, is a "normal" search available that would find all portrait/landscape images or could it be achieved by scripting by checking if x is > y in pixel size?

Re: Visual filter - orientation

Posted: 13 Aug 2015 16:44
by Stef123
You'd also have to check for exif-orientation, imo. Changing the orientation will not switch the physical x-y axes afaik.

Re: Visual filter - orientation

Posted: 13 Aug 2015 16:45
by highend
Only by scripting...

Try this:

Code: Select all

    $files = report("{fullname}|{prop:dimensions}<crlf>", listpane(, , 1));

    $portrait = "";
    $landscape = "";
    foreach($file, $files, "<crlf>") {
        $path       = gettoken($file, 1, "|");
        $dimensions = gettoken($file, 2, "|");
        if !($dimensions) { continue; }
        $x = gettoken($dimensions, 1, " x ");
        $y = gettoken($dimensions, 2, " x ");
        if ($x >= $y)    { $landscape = $landscape . $path . "<crlf>"; }
        elseif ($x < $y) { $portrait  = $portrait . $path . "<crlf>";  }
    }
    $choice = popupmenu("Portrait images|Landscape images", , , , , 1);
    if ($choice == 1)     { paperfolder("Portrait images", $portrait, , "nl"); }
    elseif ($choice == 2) { paperfolder("Landscape images", $landscape, , "nl"); }

Re: Visual filter - orientation

Posted: 13 Aug 2015 16:49
by mkolaski
Many thanks, that works perfectly

Re: Visual filter - orientation

Posted: 13 Aug 2015 16:56
by highend
Made a small change so that the scripts only processes files, not folder (names)...