I'm after an osx program that will convert an image into a base64 string (for web development).
Basically replicates this: http://webcodertools.com/imagetobase64converter/Create
I suspect there is no application, and in that case I'd be interested if I can get the terminal command which will encode, to apply to a certain file on Right-Click
Followup question: Can I give Automator apps a window?
SOLUTION
I combined the two solutions below, to create an application with the following code
for f in "$@"
do
openssl base64 -in "$f" | pbcopy
done
And infact I made a dropzone target using Platypus, as shown in my subsequent SO question/answer
Best Answer
Base64 Automator Droplet
You can use Automator to create your own Base64 droplet. Mac OS X includes
openssl
which can encode files to Base64; this superuser question explains how, OS X: Base64 encode via command lineecho
with the script below.To use your application, drag and drop files onto it. A new base64 encoded file will appear next to the original file.
Shell Script
To learn more about using Automator, see Apple's Mac Basics: Automator.