Benzi Posted April 23, 2013 Share Posted April 23, 2013 (edited) This is a little utility workflow that allows you to shrink your PNG files. The workflow uses the service provided by http://tinypng.org, which also explains what exactly happens when PNG files are shrunk. You need an active internet connection for this to work. Included in this workflow are File Actions (action: Shrink with TinyPNG), File Filters (keyword: tinypng) and a configurable Shortcut. Once you select a PNG file / or files and invoke the workflow, it will create a backup of your original file with the prefix "original_" and then compress your file using the web service. To get an idea of the savings, the image above was shrunk using the workflow to get a savings of 72%. Download. All images in this post were shrunk using the TinyPNG workflow. EDIT: If you are looking for an alternate similar workflow, try this one by @CarlosNZ Edited April 23, 2013 by Benzi Augusto 1 Link to comment
JuggoPop Posted July 25, 2013 Share Posted July 25, 2013 Nice one. I made one adjustment to the backup file. Instead of adding original_ to the front, I left the base the same then added .bak after the extention. I like the new image and the original to be next to each other in my folder list. When Original was added to the front, they all went into the O secion of the file list. What I would really like is something like this: logo.png > logo.20130725.bak.png Do you know how I might modify this to do that? Link to comment
Augusto Posted November 25, 2013 Share Posted November 25, 2013 Hello @Benzi! Your workflow is so great! Unfortunately, in the last weeks it stopped to work.. think thats a problem with the API (it may be changed - https://tinypng.com/developers) Thanks! Link to comment
Augusto Posted November 25, 2013 Share Posted November 25, 2013 As some users already know, the new tinypng api requires an API key. Until the next Benzi's update comes, you can do the following steps: - get your unique API key here (the free one allows you to convert up to 500 png files per month): https://tinypng.com/developers - edit the great Benzi's workflow, and in the bin/bash script element, find that line: download=$(curl -s --data-binary "@$input" http://tinypng.org/api/shrink | grep -o "http[^\"]*") .. and replace for that: download=$(curl -s --user api:YOUR_UNIQUE_API_KEY_HERE --data-binary "@$input" https://api.tinypng.com/shrink | grep -o "http[^\"]*") just save and use! JuggoPop 1 Link to comment
Augusto Posted November 25, 2013 Share Posted November 25, 2013 (edited) Nice one. I made one adjustment to the backup file. Instead of adding original_ to the front, I left the base the same then added .bak after the extention. I like the new image and the original to be next to each other in my folder list. When Original was added to the front, they all went into the O secion of the file list. What I would really like is something like this: logo.png > logo.20130725.bak.png Do you know how I might modify this to do that? juggopop, try this: - find that lines in the bin/bash script element: base=$(basename "$input") new=$(echo -n $base) - replace with that: base=$(basename "$input") currentdate=$(date +"%Y%m%d") name=$(basename "$base" .png) new=$(echo -n $name.$currentdate.bak.png) Edited November 25, 2013 by Augusto JuggoPop 1 Link to comment
JuggoPop Posted January 9, 2014 Share Posted January 9, 2014 @Augusto -- Thanks for your help! Link to comment
Ginfuru Posted November 23, 2014 Share Posted November 23, 2014 @Benzi Any chance of getting this updated to do both TinyPNG and TinyJPG? Link to comment
rasehonub Posted June 21, 2015 Share Posted June 21, 2015 Tiny compress engine auto detect to jpg or png. Im using with non-official tool on windoes works great. http://www.iptvsaga.com/tinypng-batch-script-for-windows/ Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now