OZONE Asylum
Forums
PSPong.com - Working Area!
IT works - pure php/jpeg lib for php :)
This page's ID:
13182
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
[url=http://www.wapod.com/~beta/img/jpglib.php]http://www.wapod.com/~beta/img/jpglib.php[/url] And the code, as a proof and contribution: <?php Header("Content-type: image/jpeg"); Header("Expires: Mon, 23 Jul 2002 05:00:00 GMT"); 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); return $img; } } 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); } $im = AddJpeg("pumkin_low.jpg",1); echo $im->data; ?> I added three lines to the ripped code, and now I'mable to retrieve the file data, the RAW pixels without headers, handle them and display them. Now the resize, textWrite and desaturate, then I put it under GPL, and give you (the GN) an exclusive license. Sounds cool? Oh, and.. LONG LIVE PSpong.com... now get your sorry bums back to work with me :)
Loading...
Options:
Enable Slimies
Enable Linkwords
« Backwards
—
Onwards »