Thread wurde vom System oder vom Community-Team geschlossen.

Wie kann ich die Fotos nach Grösse sortieren?

Beim Importieren einer iPhoto Mediathek nach Fotos ist was schiefgegangen. Ich habe jetzt viele Duplikate in meiner Mediathek, einmal in der Grösse von Minituren, einmal in voller Auflösung. Ich würde die Fotos gerne nach der Pixelgrösse sortiren, aber das scheint in Fotos nicht möglich zu sein.

MacBook Pro with Retina display, macOS Sierra (10.12.3)

Gepostet am 31. Mai 2017 18:54

Antworten
Frage gekennzeichnet als Beste Antwort

Gepostet am 31. Mai 2017 19:12

PowerPhotos sortiert nach der Dateigrösse.


Wenn Du in Fotos nach Fotos mit einer bestimmten Pixelzahl suchen willst, könntest Du das Skript ausprobieren, das ich hier veröffentlicht habe: https://discussions.apple.com/docs/DOC-11621


Das Skript übernimmt alle Fotos die in Fotos ausgewählt wurden. Dann fragt es nach einer minimalen Pixelzahl.

Alle Fotos, deren längste Seite kleiner als diese Pixelzahl sind, werden einem Album zugefügt, die Fotos die grösser sind dem zweiten Album.

Kopiere das Skript in den Skripteditor, wähle die Fotos aus, die du testen willst, und drücke den "Run" Knopf.



-- kopiere ab hier

(* How to use this script:


This script will split the selection into two albums -

- one album with pictures with the largest dimension smaller or equal than the given pixel size

- one album with pictures with the largest dimension larger than the given pixel size



Open this script in Script Editor. Launch Photos.

Select the Photos you want to distribute between the albums.


When all all photo are selected, press the "Run" button in Script Editor.


Author: léonie

*)


setdefaultSizeThreshold to 256 -- change this to the pixel size threshold you want for a photo to be counted as small


setdialogResulttodisplay dialog ¬

"Enter the pixel size threshold for small photos: " buttons {"Cancel", "OK"} ¬


default answer (defaultSizeThresholdastext)

setAspectRatioThreshold to (text returnedofdialogResult) as integer



setsmallAlbumName to "smallerThan" & AspectRatioThreshold-- the album to collect the small photos


setlargeAlbumName to "largerThan" & AspectRatioThreshold-- the album to collect the larger photosphotos


tell application "Photos"


activate


-- Ensure that the albums do exist


try

if not (exists container smallAlbumName) then


makenewalbumnamedsmallAlbumName

end if

set theSmallAlbumtocontainersmallAlbumName


if not (exists container largeAlbumName) then


makenewalbumnamedlargeAlbumName

end if

set theLargeAlbumtocontainerlargeAlbumName


if not (exists container "SkippedPhotos") then

make new album named "SkippedPhotos"

end if

set theSkippedAlbum to container "SkippedPhotos"



on error errTexttwonumbererrNumtwo

display dialog "Cannot open albums: " & errNumtwo & return & errTexttwo

end try



-- process the selected photos from the All Photos album

try

set imageSel to (get selection)

on error errTexttwonumbererrNumtwo

display dialog "Cannot get the selection: " & errNumtwo & return & errTexttwo

end try


set smallPhotos to {} -- the list of small photos

set largePhotos to {} -- the list of larger photos

set skippedPhotos to {} -- the list of skipped photos




-- check, if the album or the selected photos do contain images


if imageSel is {} then

error "Please select some images."

else

repeat with im in imageSel

try


tell im--get the pixel size

set h to its height

set w to its width

end tell

on error errText number errNum

display dialog "Error: " & errNum & return & errText & "Trying again"

try

delay 2

tell im

set h to its height

set w to its width

end tell

on error errTexttwonumbererrNumtwo

display dialog "Skipping image due to repeated error: " & errNumtwo & return & errTexttwo

end try


end try

set noDimensions to (w is missing value) or (h is missing value)

if noDimensionsthen

set skippedPhotos to {im} & skippedPhotos

else

if (wh) then

set largestDimensiontoh

else

set largestDimensiontow


end if

if (largestDimensionAspectRatioThreshold) then

set smallPhotos to {im} & smallPhotos

else

set largePhotos to {im} & largePhotos


end if

end if


end repeat



addsmallPhotostotheSmallAlbum


addlargePhotostotheLargeAlbum


addskippedPhotostotheSkippedAlbum


return "small photos: " & (length of smallPhotos) & ", larger photos : " & (length of largePhotos) & ", skipped: " & (length ofskippedPhotos)


end if


end tell

6 Antworten
Frage gekennzeichnet als Beste Antwort

31. Mai 2017 19:12 als Antwort auf _El_Condor_Pasa_

PowerPhotos sortiert nach der Dateigrösse.


Wenn Du in Fotos nach Fotos mit einer bestimmten Pixelzahl suchen willst, könntest Du das Skript ausprobieren, das ich hier veröffentlicht habe: https://discussions.apple.com/docs/DOC-11621


Das Skript übernimmt alle Fotos die in Fotos ausgewählt wurden. Dann fragt es nach einer minimalen Pixelzahl.

Alle Fotos, deren längste Seite kleiner als diese Pixelzahl sind, werden einem Album zugefügt, die Fotos die grösser sind dem zweiten Album.

Kopiere das Skript in den Skripteditor, wähle die Fotos aus, die du testen willst, und drücke den "Run" Knopf.



-- kopiere ab hier

(* How to use this script:


This script will split the selection into two albums -

- one album with pictures with the largest dimension smaller or equal than the given pixel size

- one album with pictures with the largest dimension larger than the given pixel size



Open this script in Script Editor. Launch Photos.

Select the Photos you want to distribute between the albums.


When all all photo are selected, press the "Run" button in Script Editor.


Author: léonie

*)


setdefaultSizeThreshold to 256 -- change this to the pixel size threshold you want for a photo to be counted as small


setdialogResulttodisplay dialog ¬

"Enter the pixel size threshold for small photos: " buttons {"Cancel", "OK"} ¬


default answer (defaultSizeThresholdastext)

setAspectRatioThreshold to (text returnedofdialogResult) as integer



setsmallAlbumName to "smallerThan" & AspectRatioThreshold-- the album to collect the small photos


setlargeAlbumName to "largerThan" & AspectRatioThreshold-- the album to collect the larger photosphotos


tell application "Photos"


activate


-- Ensure that the albums do exist


try

if not (exists container smallAlbumName) then


makenewalbumnamedsmallAlbumName

end if

set theSmallAlbumtocontainersmallAlbumName


if not (exists container largeAlbumName) then


makenewalbumnamedlargeAlbumName

end if

set theLargeAlbumtocontainerlargeAlbumName


if not (exists container "SkippedPhotos") then

make new album named "SkippedPhotos"

end if

set theSkippedAlbum to container "SkippedPhotos"



on error errTexttwonumbererrNumtwo

display dialog "Cannot open albums: " & errNumtwo & return & errTexttwo

end try



-- process the selected photos from the All Photos album

try

set imageSel to (get selection)

on error errTexttwonumbererrNumtwo

display dialog "Cannot get the selection: " & errNumtwo & return & errTexttwo

end try


set smallPhotos to {} -- the list of small photos

set largePhotos to {} -- the list of larger photos

set skippedPhotos to {} -- the list of skipped photos




-- check, if the album or the selected photos do contain images


if imageSel is {} then

error "Please select some images."

else

repeat with im in imageSel

try


tell im--get the pixel size

set h to its height

set w to its width

end tell

on error errText number errNum

display dialog "Error: " & errNum & return & errText & "Trying again"

try

delay 2

tell im

set h to its height

set w to its width

end tell

on error errTexttwonumbererrNumtwo

display dialog "Skipping image due to repeated error: " & errNumtwo & return & errTexttwo

end try


end try

set noDimensions to (w is missing value) or (h is missing value)

if noDimensionsthen

set skippedPhotos to {im} & skippedPhotos

else

if (wh) then

set largestDimensiontoh

else

set largestDimensiontow


end if

if (largestDimensionAspectRatioThreshold) then

set smallPhotos to {im} & smallPhotos

else

set largePhotos to {im} & largePhotos


end if

end if


end repeat



addsmallPhotostotheSmallAlbum


addlargePhotostotheLargeAlbum


addskippedPhotostotheSkippedAlbum


return "small photos: " & (length of smallPhotos) & ", larger photos : " & (length of largePhotos) & ", skipped: " & (length ofskippedPhotos)


end if


end tell

31. Mai 2017 18:59 als Antwort auf _El_Condor_Pasa_

Das scheint eher eine Fotos Frage als eine iPhoto Frage zu sein. Ich werde die Moderatoren bitten, die Frage ins Fotos für Mac Forum zu verschieben.


Fotos kann nicht nach Grösse sortieren. Aber die könntest die Probeversion von PowerPhotos verwenden. PowerPhotos kann die Fotos in einer Listendarstellung auch nach der Größe sortieren. PowerPhotos ist allerdings nur auf Englisch verfügbar.

Wie kann ich die Fotos nach Grösse sortieren?

Willkommen in der Apple Support Community
Ein Forum, in dem Apple-Kunden sich gegenseitig mit ihren Produkten helfen. Melde dich mit deiner Apple-ID an, um Mitglied zu werden.