BoxLang 🚀 A New JVM Dynamic Language Learn More...
__ _ _
___ / _|| |_ (_) _ __ _ _ _ __ _ __ __ _
/ __|| |_ | __|| || '_ \ | | | || '_ \ | '_ \ / _` |
| (__ | _|| |_ | || | | || |_| || |_) || | | || (_| |
\___||_| \__||_||_| |_| \__, || .__/ |_| |_| \__, |
|___/ |_| |___/
TinyPNG.com ColdFusion Rest API Client
Super easy way to compress PNG & JPG images with this remote web service, free accounts include 500 operations per month. Signup at https://tinypng.com/developers
Run the following from commandbox:
box install cftinypng
tiny = new cftinypng.tinypng( apiKey= "..." );
result= tiny.shrinkUrl( "https://www.imagineer.ca/images/caricature.png" );
if( result.success ) {
writeOutput( '<img src="#result.image#" width="#result.width#" height="#result.height#" />' );
}
// or
result= tiny.shrinkImage( "image.jpg" );
if( result.success ) {
tiny.getImage( result.image, "./output.jpg" );
}
Install testbox
box install
box testbox run
https://tinypng.com/developers/reference
Apache License, Version 2.0.
$
box install cftinypng