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
https://forums.phpfreaks.com/topic/62065-solved-imagecreatetruecolor-help/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.