Jump to content

[SOLVED] imagecreatetruecolor (?) help


sccottt

Recommended Posts

i've got this code (in the midst of a bunch of other code):

 

 

$file = $_POST['file'];

$trgt_w = $_POST['w'];

$trgt_h = $_POST['h'];

 

list($w, $h) = getimagesize($file);

echo "w " . $w . ", h " . $h;

 

$src = imagecreatefromjpeg($file);

echo " imagecreatefromjpeg";

 

$thm = imagecreatetruecolor($trgt_w, $trgt_h);

echo " imagecreatetruecolor"; 

 

 

I noticed that my code wasn't always executing all the way through. So, I put in those echo lines, and noticed that for SOME images, the "imagecreatetruecolor" echo line never gets executed.

 

It seems that for larger, say desktop background sized, images, the code quits before getting to that echo line... as it never returns that echo. For smaller images, the code works through that line and perfectly through the rest of the code.

 

I don't know a ton of PHP, so I am at an impass here. Anything strike anyone as to why this code wouldn't work for larger images? It needs to work for larger images. Am I missing something else?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.