Last active
August 29, 2015 13:56
-
-
Save MarioRicalde/9267893 to your computer and use it in GitHub Desktop.
Copy the image dimensions as CSS via Terminal.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function imgdim() { | |
echo "Image Dimensions copied to the Clipboard." | |
sips -g pixelHeight -g pixelWidth $1 | sed '1 d' | sed 's/ pixelHeight: \(.*\)/height: \1px;/' | sed 's/ pixelWidth: \(.*\)/width: \1px;/' | pbcopy | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment