Hi folks,

I have a function library, which I'd like to alter for my purposes, to allow PNG 
images to be stored. The only problem is I can't make head nor tails of the code. It 
does not seem to call any GD functions, even though it says it's supposed to. Could 
anyone explain basically what this code does?

// ------------------------------------------------------------------------------

function addJpegImage_common(&$data,$x,$y,$w=0,$h=0,$imageWidth,$imageHeight){
  // note that this function is not to be called externally
  // it is just the common code between the GD and the file options
  $this->numImages++;
  $im=$this->numImages;
  $label='I'.$im;
  $this->numObj++;
  
$this->o_image($this->numObj,'new',array('label'=>$label,'data'=>$data,'iw'=>$imageWidth,'ih'=>$imageHeight));

  $this->objects[$this->currentContents]['c'].="\nq";
  $this->objects[$this->currentContents]['c'].="\n".$w." 0 0 ".$h." ".$x." ".$y." cm";
  $this->objects[$this->currentContents]['c'].="\n/".$label.' Do';
  $this->objects[$this->currentContents]['c'].="\nQ";
}

// ------------------------------------------------------------------------------
(I've set wrap off for readability of code)


This SEEMS to be called by....

$this->addJpegImage_common($data,$x,$y,$w,$h,$imageWidth,$imageHeight);

Does anyone understand the function?

Thanks!

-- 
Yoav Felberbaum
E-Mail: [EMAIL PROTECTED]
Website (Not worth looking ^_^) : http://www.wlv.ac.uk/~c9807379/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to