1
0

Updated modules that use graphics rules, and updated a couple that called gallery_graphics::resize directly.

This commit is contained in:
colings 2011-02-21 15:42:48 -06:00
parent 3d7ebaf747
commit abef6b5dab
4 changed files with 6 additions and 5 deletions

View File

@ -62,11 +62,11 @@ class Ecard_Controller extends Controller {
$tmpfile = tempnam(TMPPATH, "clean");
if($form->send_ecard->send_thumbnail->checked == true) {
$options = array("width" => module::get_var("gallery", "thumb_size"), "height" => module::get_var("gallery", "thumb_size"), "master" => Image::AUTO);
gallery_graphics::resize($item->file_path(), $tmpfile, $options);
gallery_graphics::resize($item->file_path(), $tmpfile, $options, $item);
$mime->addHTMLImage($tmpfile,$item->mime_type,$item->name);
} else {
$options = array("width" => module::get_var("gallery", "resize_size"), "height" => module::get_var("gallery", "resize_size"), "master" => Image::AUTO);
gallery_graphics::resize($item->file_path(), $tmpfile, $options);
gallery_graphics::resize($item->file_path(), $tmpfile, $options, $item);
$mime->addHTMLImage($tmpfile,$item->mime_type,$item->name);
}
} else {

View File

@ -28,7 +28,8 @@ class max_size_event_Core {
$tmpfile = $tempnam . "." . pathinfo($item->data_file, PATHINFO_EXTENSION);
gallery_graphics::resize(
$item->data_file, $tmpfile,
array("width" => $max_size, "height" => $max_size, "master" => Image::AUTO));
array("width" => $max_size, "height" => $max_size, "master" => Image::AUTO),
$item);
rename($tmpfile, $item->data_file);
unlink($tempnam);
}

View File

@ -27,7 +27,7 @@ class rectangle_thumbs_graphics_Core {
* @param string $output_file
* @param array $options
*/
static function crop_to_aspect_ratio($input_file, $output_file, $options) {
static function crop_to_aspect_ratio($input_file, $output_file, $options, $item) {
graphics::init_toolkit();
if (@filesize($input_file) == 0) {

View File

@ -25,7 +25,7 @@ class square_thumbs_graphics_Core {
* @param string $output_file
* @param array $options
*/
static function crop_to_square($input_file, $output_file, $options) {
static function crop_to_square($input_file, $output_file, $options, $item) {
graphics::init_toolkit();
if (@filesize($input_file) == 0) {