summaryrefslogtreecommitdiff
path: root/modules/gallery/helpers/gallery_graphics.php
AgeCommit message (Collapse)Author
2013-01-27#1969 - Give graphics events the ability to override the standard process.shadlaws
While graphics_rotate, graphics_resize, and graphics_composite events already exist, they don't have the ability to *override* the standard process. This makes it a bit tricky when you want to replace the standard procedure with another (e.g. use jpegtran to perform lossless jpg rotation). Solution: - make a temp filename. - tell the events to use it as the output file. - if an event makes something, use it and skip the standard process.
2013-01-25#1965 - Improve sanity checks and copy/convert/process logic for rotate and ↵shadlaws
resize. - resize: ensured that resize is skipped *only* if the metadata is valid or the options are well-defined and would upscale. Then, if resize is skipped, check to see if it still needs to be converted. Previous conditions would allow a small PNG to get copied to a JPG, and would allow a corrupted JPG to be copied to the output. - rotate: add checks for empty file or empty options. - use get_file_metadata instead of direct getimagesize call. - add unit tests for rotate and resize, including some for corrupted input files and missing options.
2013-01-21Update copyright to 2013. Fixes #1953.Bharat Mediratta
2012-05-07Fix typo in call to Kohana_Exception::getMessage, thanks to Serge.Bharat Mediratta
Fixes #1780.
2012-02-27Update copyright to 2012. #1822Bharat Mediratta
2011-03-05Add missing phpDoc for the extra Item_Model argument to graphics callsBharat Mediratta
and make the param optional. #1646.
2011-02-23Added extra arg to gallery_graphics calls and updated userscolings
2011-02-21Added 'item' to parameters passed to graphics rulescolings
2011-01-21Update copyright to 2011.Bharat Mediratta
2011-01-11Don't resize if the target size is the same as the original. Fixes #1602.Bharat Mediratta
2010-12-23Fix PHPDoc for composite().Bharat Mediratta
2010-03-03Update the copyright to 2010. It's only 3 months into the year :-)Bharat Mediratta
2009-11-25Preliminary work to cut over to Kohana 2.4Bharat Mediratta
- Kohana::log() -> Kohana_Log::add() - Kohana::config_XXX -> Kohana_Config::instance()->XXX - Implement View::set_global in MY_View - Updated Cache_Database_Driver to latest APIs - ORM::$loaded -> ORM::loaded() - Updated item::viewable() to use K2.4 parenthesization
2009-10-06Move the graphics::rotate to gallery_graphics::rotate to be consistent with ↵Tim Almdal
the other gallery graphics functions.
2009-09-27This path requires the upgrader to be run and applies the following changes:Tim Almdal
* moves the composite method back into core * requires that the operation be fully qualified i.e. gallery_graphics::resize * caches the graphics rules on each request
2009-09-24Refactor the graphic rules processing to accomplish 2 goals: First separate ↵Tim Almdal
the grapics library from module supplied rules and secondly, allow for modules to provide new processing rules callbacks. graphics::generate will now look for <module_name>_graphics::<rule> methods.