macOS: saving images from the clipboard using `pngpaste` is faded and white When I take a screenshot on macOS, and use pngpaste a1.png to save it, the image is faded:

This only happens when I take a fullscreen screenshot using CMD+SHIFT+3, and not with CMD+SHIFT+4.
Using these instead works fine:
function pngpaste() {
    local name=&quot;${1}&quot;
    ensure-args name @MRET
    ensure isDarwin @MRET

    [[ &quot;$name&quot; =~ '\.png$' ]] || name+=.png

    osascript -e &quot;tell application \&quot;System Events\&quot; to ¬
                  write (the clipboard as «class PNGf») to ¬
                          (make new file at folder \&quot;$(pwd)\&quot; with properties ¬
                                  {name:\&quot;${name}\&quot;})&quot;
}
function jpgpaste() {
    local name=&quot;${1}&quot;
    ensure-args name @MRET
    ensure isDarwin @MRET


    [[ &quot;$name&quot; =~ '\.jpg$' ]] || name+=.jpg

    osascript -e &quot;tell application \&quot;System Events\&quot; to ¬
                  write (the clipboard as JPEG picture) to ¬
                          (make new file at folder \&quot;$(pwd)\&quot; with properties ¬
                                  {name:\&quot;${name}\&quot;})&quot;
}

Usage:
pngpaste a1.png