maintaining.md
First, we need to install the app:
Gifski_DATE_.xcarchive, and click Show Package Contents./Products/Applications and move Gifski.app to your Applications directory.Then, we need to check if our system has the latest service installed:
/System/Library/CoreServices/pbs -dump | grep Gifski.app
NSBundlePath = "/Applications/Gifski.app” - you're good to go./System/Library/CoreServices/pbs -update
Sometimes the service doesn't work and it's really hard to understand why without any tools. You can use a debug flag on the instance of Finder app and see the logs it dumps:
/System/Library/CoreServices/Finder.app/Contents/MacOS/Finder -NSDebugServices com.sindresorhus.Gifski
Videos can have a preferredTransform that rotates the raw frames (e.g., portrait videos filmed on phones). There are two coordinate spaces:
naturalSize), unrotated (e.g., 1920x1080)In this app:
metadata.dimensions) are in preferred space (already rotated)AVAssetImageGenerator with appliesPreferredTrackTransform = true returns images in preferred spaceAVComposition layer instructions operate in natural space (must transform crop back)When cropping images: Apply crop directly (images are pre-rotated). When exporting video: Transform crop from preferred → natural space first.