/[drupal]/contributions/modules/watermark/watermark.module
ViewVC logotype

Diff of /contributions/modules/watermark/watermark.module

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.5.2.6, Sat May 17 20:38:05 2008 UTC revision 1.5.2.7, Thu Jul 10 00:16:31 2008 UTC
# Line 1  Line 1 
1  <?php  <?php
2    
3  // $Id: watermark.module,v 1.5.2.5 2007/07/07 17:53:29 kbahey Exp $  // $Id: watermark.module,v 1.5.2.6 2008/05/17 20:38:05 kbahey Exp $
4  // Author: Khalid Baheyeldin of http://2bits.com  // Author: Khalid Baheyeldin of http://2bits.com
5  // Additional features by schnizZzla for http://BerlinerStrassen.com  // Additional features by schnizZzla for http://BerlinerStrassen.com
6    
# Line 407  function _watermark_process($image_path, Line 407  function _watermark_process($image_path,
407      watchdog(WATERMARK_WATCHDOG, $msg, WATCHDOG_ERROR);      watchdog(WATERMARK_WATCHDOG, $msg, WATCHDOG_ERROR);
408    }    }
409    // create an image of the same type!    // create an image of the same type!
410    else if (!$img_create_func($im, $image_path)) {    else if (!_watermark_create_image($im, $image_path, $img_create_func)) {
411      $msg = t('Failed to save merged image.');      $msg = t('Failed to save merged image.');
412      drupal_set_message($msg, 'error');      drupal_set_message($msg, 'error');
413      watchdog(WATERMARK_WATCHDOG, $msg, WATCHDOG_ERROR);      watchdog(WATERMARK_WATCHDOG, $msg, WATCHDOG_ERROR);
# Line 422  function _watermark_process($image_path, Line 422  function _watermark_process($image_path,
422    return $status;    return $status;
423  }  }
424    
425    function _watermark_create_image($im, $image_path, $img_create_func) {
426      if ($img_create_func == 'imagejpeg')
427        return $img_create_func($im, $image_path, variable_get('image_jpeg_quality', 80));
428      else
429        return $img_create_fucn($im, $image_path);
430    }
431    
432    
433  function _watermark_make_image($file) {  function _watermark_make_image($file) {
434    
435    if (!file_exists($file)) {    if (!file_exists($file)) {

Legend:
Removed from v.1.5.2.6  
changed lines
  Added in v.1.5.2.7

  ViewVC Help
Powered by ViewVC 1.1.2