FORGEBOX Enterprise 🚀 - Take your ColdFusion (CFML) Development to Modern Times! Learn More...

cftinypng

v0.8.1 Modules
         __  _    _                                    
   ___  / _|| |_ (_) _ __   _   _  _ __   _ __    __ _ 
  / __|| |_ | __|| || '_ \ | | | || '_ \ | '_ \  / _` |
 | (__ |  _|| |_ | || | | || |_| || |_) || | | || (_| |
  \___||_|   \__||_||_| |_| \__, || .__/ |_| |_| \__, |
                            |___/ |_|            |___/ 

Build Status testbox Lucee 5.3 Lucee 4.5 Adobe ColdFusion 2018 Adobe ColdFusion 2016 License

cftinypng

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

To Install

Run the following from commandbox: box install cftinypng

Example

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" );
}

Run Tests

Install testbox

box install
box testbox run

Changes

  • 2020-05-01 Testbox, Travis CI, Adobe Coldfusion Compatibility
  • 2019-05-28 Open source release

API documentation

https://tinypng.com/developers/reference

License

Apache License, Version 2.0.

$ box install cftinypng

No collaborators yet.
   
  • {{ getFullDate("2019-05-28T19:18:39Z") }}
  • {{ getFullDate("2020-06-12T17:42:50Z") }}
  • 1,644
  • 1,903