ShareShortcuts

Resize Images 📷

bksiefert
Dupliquer « Resize Images 📷 »

Tu as créé quelque chose de nouveau à partir de ce raccourci ? Partage-le comme version dérivée : il devient un raccourci à toi, que tu gères, et les deux pages renvoient l’une vers l’autre pour que bksiefert soit crédité.

  1. 1Obtenez le raccourci et modifiez-le dans l’app Raccourcis. Donnez-lui un nom bien à lui.
  2. 2Partage-le depuis l’app Raccourcis et copie le lien iCloud.
  3. 3Reviens ici, colle le lien et décris ce qui change, par exemple : « Ajout d’une étape qui utilise Apple Intelligence pour personnaliser le texte. »
Créer mon fork
Téléchargements
61K
Enregistré
1
Actions
18
Catégorie
Photos and videos
Version
1.0
Langue
EN

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. ❤️

Nouveautés

Version 1.0

First release

Historique des versions
1.0 14 avr. 2020

First release

Ce qu’il fait

18 actions
  1. Comment
    1200
  2. If
  3. Select Photos
  4. If
  5. Comment
    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.
  6. Text
  7. Repeat with Each
  8. Get Details of Images
  9. Get Details of Images
  10. If
  11. Resize Image
  12. Convert Image
  13. Save to Photo Album
  14. If
  15. Resize Image
  16. Convert Image
  17. Quick Look
  18. Comment
    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.

Afficher en tant que code
Bêta

Chaque action de ce raccourci écrite en Cherri, un langage de programmation pour Raccourcis. Idéal pour comprendre son fonctionnement.

#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.
Ouvrir dans Cherri Playground Décompilé avec cherri 2.3.0 (GPL-2.0). Quelques corrections peuvent être nécessaires avant la compilation.

Notes et avis

Écrire un avis
–
sur 5
★★★★★
★★★★
★★★
★★
★
0 ratings

Aucun avis pour le moment. Sois le premier à partager ton avis !

Publicité

Plus de bksiefert

Tout afficher

Ça pourrait aussi te plaire

Tout afficher
Publicité