0
I Use This!
Activity Not Available
Analyzed about 1 year ago. based on code collected about 1 year ago.

Project Summary

Kohana PHP has an image library that provides tools to manipulate an image and then save it to a desired location. DynamicImage is designed to deliver an existing image stored on the server to the client at any size, using one of three standard formats. The resulting image is not effecting the source, this library dynamically alters the image and delivers a new modified copy - the source remains untouched.

This library is designed to plug into Kohana PHP as a module, but you could use the library independently without the integrated controller.

KDynamicImage UseUsing clean URLs (recommended)To access images with KDynamicImage using URL's without GET arguments, use the following syntax to load an image without modification :

http:///dynamicimage////.

To augment the resource, insert a string formatted correctly between the file name and extention, separated by '.' so the full path still looks valid with a proper extension.

Note : The extension must be correct to the image resource, not the format you wish to receive the file in.

w100px output width in pixels, in this case 100px h140px output height in pixels, in this case 140px mrwidth maintain ratio based on width setting, replace 'width' with 'height' for reverse fpng output the file as a png, replace 'png' with 'jpg' or 'gif' for JPEG and GIF formats respectively mt1 maintain existing transparency. Omit this argument to not maintain transparency cr1 Crop ratio for the image width / height. A standard widescreen image has a crop ratio of 1.778 ( 16:9 ), where the width is 1.778 times the height. To use decimal values, ammend the decimal point with an underscore. bkF2C14F background colour for transparent images in HEX (without #) defaults to FFFFFF optional To use this within the URL, use the following syntax :

http:///dynamicimage////.DiSw100px-h150px-mrwidth-fpng-mt1-cr0_5-bkF2C14F.

Using clean URLs can help with local caching within the web browser and ISPs. KDynamicImage can be processor intensive if you are serving a lot of images to a lot of clients simultaneously. Using clean URLs will help force browsers to cache the resource.

Using dynamic GET variablesTo access images with KDynamicImage using the GET method, use the following syntax to load an image without modification :

http:///dynamicimage/?file=///

Using the built in controller you can add additional arguments to the GET request to augment the original resource :

width output width in pixels (don't add px to value) optional, required if mr='width' height output height in pixels (don't add px to value) optional, required if mr='height' mr maintain ratio, valid values or 'width' or 'height' optional, requires either a width or height format output image format ('gif', 'jpg' or 'png'), defaults to input format optional mt keep gif/png transparency if set to 'true' defaults to FALSE optional bk background colour for transparent images in HEX (without #) defaults to FFFFFF optional cr Crop ratio for the image width / height. A standard widescreen image has a crop ratio of 1.778 ( 16:9 ), where the width is 1.778 times the height. Although the module is designed to work with Kohana PHP, the library itself could exist independently of Kohana. More details of this will be available on Google Code where you can download the latest release or checkout the latest revisions from SVN.

This library requires GD 2.0 for PHP to be installed on your web server

Tags

gd imagemanipulation kohana php

In a Nutshell, kdynamicimage...

This Project has No vulnerabilities Reported Against it

Did You Know...

  • ...
    Black Duck offers a free trial so you can discover if there are open source vulnerabilities in your code
  • ...
    by exploring contributors within projects, you can view details on every commit they have made to that project
  • ...
    65% of companies leverage OSS to speed application development in 2016
  • ...
    you can subscribe to e-mail newsletters to receive update from the Open Hub blog

Languages

Languages?height=75&width=75
PHP
100%
HTML
<1%

30 Day Summary

Apr 9 2016 — May 9 2016

12 Month Summary

May 9 2015 — May 9 2016

Ratings

Be the first to rate this project
Click to add your rating
   Spinner
Review this Project!