Skip to content

MacOS Screenshots

Screenshots

  1. Capture the Entire Screen

    • Press Command (⌘) + Shift + 3
  2. Capture a Specific Window

    • Press Command (⌘) + Shift + 4, then press Spacebar.
  3. Use the Screenshot Toolbar

    • Press Command (⌘) + Shift + 5

Save location for screenshots

  1. Press Command (⌘) + Shift + 5 to open the screenshot toolbar.
  2. In the toolbar, click Options.
  3. Under the Save To section, choose Other Location.
  4. Navigate to your desired folder and click Choose.

Screenshot format

Change the default screenshot format

Open Terminal app.

Jpg

defaults write com.apple.screencapture type jpg
jpg(457KB)
alt text

PNG (default):

defaults write com.apple.screencapture type png
png(1MB)
alt text

Remove the shadow from screenshots

Open Terminal app.

defaults write com.apple.screencapture disable-shadow -bool true  

killall SystemUIServer
jpg(362KB)
alt text

Reset screenshot settings

defaults delete com.apple.screencapture

AppleScript Application

  1. Create a New Script

    1. Open the Script Editor.
    2. Create a new document.
  2. Paste the following AppleScript code into the Script Editor

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    on open droppedFiles
        set targetWidth to 800 -- Target width for resizing (in pixels)
    
        repeat with eachFile in droppedFiles
            -- Get the file path
            set filePath to POSIX path of eachFile
    
            -- Check file extension and process only image files
            if filePath ends with ".jpg" or filePath ends with ".jpeg" or filePath ends with ".png" then
                -- Determine the output path (add _resized to the original filename)
                set outputFilePath to (text 1 through -5 of filePath) & "_resized.jpg"
    
                -- Check if output file already exists
                set fileExists to false
                try
                    set fileExists to (do shell script "test -e " & quoted form of outputFilePath & " && echo true || echo false") is "true"
                end try
    
                -- If the file exists, ask the user if they want to cancel
                if fileExists then
                    set cancelChoice to display dialog "File already exists. Do you want to cancel?" buttons {"Cancel"} default button "Cancel"
                    if button returned of cancelChoice is "Cancel" then
                        return -- Skip this file without showing a message
                    end if
                end if
    
                -- Resize the image using ffmpeg
                do shell script "/opt/homebrew/bin/ffmpeg -i " & quoted form of filePath & " -vf \"scale=800:-1\" -q:v 2 " & quoted form of outputFilePath
    
            else
                display dialog "Only image files (JPG, PNG, etc.) are allowed." buttons {"OK"} default button "OK"
            end if
        end repeat
    
        -- Display a completion message
        display dialog "Images resized successfully!"
    end open
    

    Note

    Line28: replace “/opt/homebrew/bin/ffmpeg” with the path to ffmpeg on your pc

    % which ffmpeg
    /opt/homebrew/bin/ffmpeg
    

  3. Save as an Application

    1. From the Script Editor menu, choose File > Save As.
    2. When saving, select the following settings:
      File Format: Application
      Location: Choose where you want to save (e.g., Desktop).
  4. After saving, this AppleScript will work as an application.
    Drug and dorp a jpg or png file

Download resize_w800jpg.zip <- This app will not work on your PC due to a security issue.

Note

If you don’t have ffmpeg, install it.

% brew install ffmpeg
To install ffmpge, you need Homebrew installed
% brew --version
Homebrew 4.0.6
If you do not have Homebrew, install it from Homebrew