简体   繁体   English

有没有办法按宽高比过滤 iOS Shortcuts 照片?

[英]Is there a way to filter iOS Shortcuts photos by aspect ratio?

Is there a way to filter iOS Shortcuts photos by aspect ratio?有没有办法按宽高比过滤 iOS Shortcuts 照片?

I have a Shortcut that finds a random photo after the filter Favorite in the last 12 months is applied.我有一个快捷方式,可以在应用最近 12 个月的收藏夹后找到一张随机照片。 I would like to only have vertically oriented photos but aspect ratio isn't an option.我只想有垂直方向的照片,但纵横比不是一个选项。 Width and Height are options but the filter doesn't appear to let me compare the two whereby the width is less than the height.宽度和高度是选项,但过滤器似乎不允许我比较宽度小于高度的两者。 Currently I'm using a hard coded less than width which won't work long term if photo resolutions change.目前我正在使用小于宽度的硬编码,如果照片分辨率发生变化,它将无法长期工作。 在此处输入图像描述

Had the exact same issue:有完全相同的问题:

I worked around this by getting 1 photo result, then using 'Get details of images' to set height and width to variables and comparing them in an if statement.我通过获取 1 张照片结果来解决此问题,然后使用“获取图像的详细信息”将高度和宽度设置为变量并在 if 语句中进行比较。 If height bigger than width, set photo as wallpaper and end shortcut.如果高度大于宽度,则将照片设置为墙纸并结束快捷方式。

Wrapped the whole thing, including "Find photos" in "Repeat 20x" so it will iterate until it finds a match.包装了整个事情,包括“重复 20 倍”中的“查找照片”,因此它将迭代直到找到匹配项。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM