This shortcut resizes images to a set length to reduce size and set images to a particular size. Wait, aren’t there lots of other Resize Image shortcuts? Why would I want this one? 2 reasons:
✅ This shortcut resizes the long edge of the image—not just the width like most resize shortcuts.
✅ You can resize multiple images with this shortcut, not just one.
The default size is 1200px, but you can easily change it to whatever you’d like. I hope you enjoy it. This was the first shortcut where I learned the “Repeat with Each” action so it’ll always have a special place in my heart. ❤️
Novidades
First release
O que ele faz
18 ações-
Comment1200
-
If
-
Select Photos
-
If
-
CommentThis first IF is to make it so I can run it from the Share Sheet or directly in the Shortcuts app. The shortcut accepts images, but if it doesn't have any value, it prompts you to select an image.
-
Text
-
Repeat with Each
-
Get Details of Images
-
Get Details of Images
-
If
-
Resize Image
-
Convert Image
-
Save to Photo Album
-
If
-
Resize Image
-
Convert Image
-
Quick Look
-
CommentThe reason I made this a Repeat action is so it will resize the longest edge of the given photo. Simply passing in a list of images to be resized only resizes the all the images by width or the height—but doesn't resize based on the longest edge.
Ver como código
Todas as ações deste atalho escritas em Cherri, uma linguagem de programação para o app Atalhos. Ótimo para aprender como ele funciona.
#include 'actions/photos'
#define color darkblue
#define glyph picture
// 1200
const PhotoInput1 = if !ShortcutInput {
const PhotoInput = selectPhotos(false)
} else {
}
// This first IF is to make it so I can run it from the Share Sheet or directly in the Shortcuts app. The shortcut accepts images, but if it doesn't have any value, it prompts you to select an image.
const LongEdge = "1200"
for _ in PhotoInput1 {
const Width = getImageDetail(@RepeatItem, "Width")
const Height = getImageDetail(@RepeatItem, "Height")
if Width > Height {
const ResizedImage = resizeImage(@RepeatItem, LongEdge)
const ConvertedImage = convertImage(ResizedImage, "", 0.9590867)
savePhoto(ConvertedImage)
} else {
const ResizedImage1 = resizeImage(@RepeatItem, "", LongEdge)
const ConvertedImage1 = convertImage(ResizedImage1, "", 0.9545205)
quicklook(ConvertedImage1)
}
}
// The reason I made this a Repeat action is so it will resize the longest edge of the given photo. Simply passing in a list of images to be resized only resizes the all the images by width or the height—but doesn't resize based on the longest edge.
Avaliações e comentários
Escrever uma avaliaçãoAinda não há avaliações. Seja o primeiro a compartilhar o que você pensa!