Imagemagick Api calls

Events happening in the community are now at Drupal community events on www.drupal.org.
arava_phani's picture

Single Function call:

<?php
function image_imagemagick2_resize($source,$dest,$width,$height){
$convobj=new stdClass();
  
$convobj->source=$source;
  
$convobj->dest=$dest;
  
$convobj->functioncall='resize';
 
$convobj->params=array('width'=>$width,'height'=>$height);
    return
image_imagemagick2_convert($convobj);
}
?>

Multiple functions call:

<?php
function image_imagemagick2_resize_and_flip($source,$dest,$width,$height){
   
$convobj=new stdClass();
  
$convob->multiple = TRUE;
  
$convobj->source=$source;
  
$convobj->dest=$dest;
  
$convobj->functioncall=array('resize','flip');
 
$convobj->params=array(array('width'=>$width,'height'=>$height),array());
return
image_imagemagick2_convert($convobj);
}
?>

Comments

Stacking

heine's picture

As the number of combined edits is nearly infinite, I don't think it's necessarily a good idea to provide these combined edits as functions.

Instead, modules can prepare an 'edits' array or object with in-order effects & parameters, then pass it to the dispatch function. I would also like to have the function and parameter grouped (in object or array) rather then having $parameters[n] as parameters for $functioncall[n], because that's brittle.

SoC 2006: Imagemagick

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week