ShareShortcuts

ShrinkToFit

Shrink a photo to fit your iDevice

outlander-2007
Dupliquer « ShrinkToFit »

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 outlander-2007 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
42K
Enregistré
0
Actions
44
Catégorie
API
Version
1.0
Langue
EN

Shrink a photo to fit your iDevice

Nouveautés

Version 1.0

First release

Historique des versions
1.0 7 avr. 2022

First release

Ce qu’il fait

44 actions
  1. If
  2. Set Variable
    Photo
  3. If
  4. Select Photos
  5. Set Variable
    Photo
  6. Get Dictionary Value
  7. If
  8. Text
  9. URL
    data:text/html,…
  10. Split Text
  11. Get Item from List
  12. Set Variable
    Screen Height
  13. Get Item from List
  14. Set Variable
    Screen Width
  15. If
  16. If
  17. List
  18. Choose from List
  19. If
  20. Text
  21. If
  22. Text
  23. If
  24. Text
  25. If
  26. Text
  27. If
  28. If
  29. Resize Image
  30. Set Variable
    Photo
  31. If
  32. Resize Image
  33. Set Variable
    Photo
  34. Crop Image
  35. Set Name
  36. Quick Look
  37. Convert Image
  38. Set Variable
    Photo
  39. Get Dictionary Value
  40. Set Variable
    Croppers
  41. If
  42. Choose from List
  43. Get Dictionary Value
  44. Set Variable
    Croppers

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 lightblue
#define glyph picture


if ShortcutInput {
	@Photo = ShortcutInput
} else {
	selectPhotos()
	@Photo
}
const DictionaryValue = getValue({}, @Photo['Height'])

if !DictionaryValue {
	const URL = url("data:text/html,{}")
	const SplitText = splitText(URL)
	getListItem(SplitText, 0)
	@ScreenHeight
	getListItems(SplitText, 0, 0)
	@ScreenWidth
	if @ScreenWidth <= @Photo {
		if @ScreenHeight <= @Photo {
			const List = list("ShrinkToFit")
			const ChosenItem = chooseFromList(List, "The  selected image is larger than the screen. It will be adjusted to fit properly. Choose an option below: ")
			if ChosenItem == "Crop to fit" {
			} else {
			}
		} else {
		}
	} else {
	}
	if IfResult == "Resize" {
		if @Photo > @Photo {
			resizeImage(@Photo, "", @ScreenHeight)
			@Photo
		} else {
			resizeImage(@Photo, @ScreenWidth)
			@Photo
		}
	}
	const CroppedImage = cropImage(@Photo, @ScreenWidth, @ScreenHeight)
	const RenamedItem = setName(CroppedImage, "Press on the Share button and tap Save image.")
	quicklook(RenamedItem)
	convertImage(CroppedImage, "PNG")
	@Photo
}
@Croppers = nil[@Photo['Height']]

if @Croppers !contains "Models" {
	chooseFromList(@Croppers, "What type of device are you making icons for?")
	@Croppers = @Croppers[]
}
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 outlander-2007

Tout afficher

Ça pourrait aussi te plaire

Tout afficher
Publicité