OZONE Asylum
Forums
PSPong.com - Working Area!
Site open?
This page's ID:
13181
Search
QuickChanges
Forums
FAQ
Archives
Register
Edit Post
Who can edit a post?
The poster and administrators may edit a post. The poster can only edit it for a short while after the initial post.
Your User Name:
Your Password:
Login Options:
Remember Me On This Computer
Your Text:
Insert Slimies »
Insert UBB Code »
Close
Last Tag
|
All Tags
UBB Help
Just to let you know, so we can work this open source, I got this code so far: [code] function AddJpeg($filename, $id) { if (!file_exists($filename)) { // Error return; } $pfile = fopen($filename, 'rb'); $hdr = (ord(fread($pfile, 1)) << 8) + ord(fread($pfile, 1)); while (true) { $hdr = (ord(fread($pfile, 1)) << 8) + ord(fread($pfile, 1)); if (!$hdr) break; $len = (ord(fread($pfile, 1)) << 8) + ord(fread($pfile, 1)) - 2; $data = fread($pfile, $len); if ($hdr == 65472) { $img->depth = ord(substr($data,0,1)); $img->height = (ord(substr($data,1,1))<<8) + ord(substr($data,2,1)); $img->width = (ord(substr($data,3,1))<<8) + ord(substr($data,4,1)) ; // Save it to array fclose($pfile); $pfile = fopen($filename, 'rb'); $img->data = fread($pfile, $img->length = filesize($filename)); fclose($pfile); $this->images[$id] = $img; return; } } fclose($pfile); } function putImage($id, $x, $y, $w = 0, $h = 0) { if ($this->in_text_object) { $this->pdfout("ET\n"); $this->in_text_object = 0; } if (!$w) $w = $this->images[$id]->width; if (!$h) $h = $this->images[$id]->height; $y = $this->height - $y - $h; // Flip y axis $this->pdfout("q\n$w 0 0 $h $x $y cm\n/$id Do\nQ\n"); } function fixdec($in) { return number_format($in, 3); } } [/code] [url=http://www.wapod.com/~beta/] [img]http://www.wapod.com/~ini/newsig4.gif[/img] [/url] It only consists of a couple of php functions intended to put a jpg in a pdf file, from [url=http://www.gnuvox.com]php4pdf[/url] library. [This message has been edited by InI (edited 04-05-2002).]
Loading...
Options:
Enable Slimies
Enable Linkwords
« Backwards
—
Onwards »