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
#!/usr/bin/ruby | |
# From Brett Terpstra <https://gist.github.com/ttscoff/d11fd063d0047bb0d4d235d2279e2085> | |
# extended by Jonathan Clark 2.4.2018 to allow original to be kept | |
# extended further, 11.9.2020 to allow borders to be added (currently white and/or black) | |
# and published at https://gist.github.com/jgclark/2f82e4a27a6157d5608cfc122b26891f | |
# | |
# Example: | |
# > file1@2x%%ohc.png | |
# => Converts png to jpeg, creates 1x and 2x versions, optimizes both with jpegoptim | |
# |