What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » Assistance with PHP and GD

Assistance with PHP and GD
Author: Message:
WDZ
Former Admin
*****

Avatar

Posts: 7106
Reputation: 107
– / Male / Flag
Joined: Mar 2002
RE: Assistance with PHP and GD
quote:
Originally posted by MeEtc
The problem is, imagepng returns a boolean value for if the operation is successful, and not the data for the image. I have no idea if its possible to capture the output buffer to a variable or not, or if this order of events would even be possible.
It's possible, I do it all the time... :p

code:
ob_start();
$success = imagepng($main_image);
$imgdata = ob_get_clean();

imagedestroy($main_image);

if(!$success) {
    die('Error creating image');
}

// ... sql query and headers and stuff ...

echo $imgdata;
file_put_contents($imgfile, $imgdata);

quote:
On a side note, why are .xls files not allowed to be uploaded?
Fixed.

This post was edited on 02-21-2008 at 07:27 PM by WDZ.
02-21-2008 07:18 PM
Profile PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Assistance with PHP and GD - by MeEtc on 02-21-2008 at 06:57 PM
RE: Assistance with PHP and GD - by WDZ on 02-21-2008 at 07:18 PM
RE: Assistance with PHP and GD - by Matti on 02-21-2008 at 07:22 PM
RE: Assistance with PHP and GD - by MeEtc on 02-21-2008 at 07:34 PM
RE: Assistance with PHP and GD - by ShawnZ on 02-21-2008 at 09:00 PM
RE: Assistance with PHP and GD - by MeEtc on 02-21-2008 at 09:15 PM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On