Sounds like an awesome reason, I will try that. I was using this tutorial:
http://www.phpbuilder.com/columns/michael20020712.php3
Now my code looks like this:
<?php
// Portrait Start
// Portrait Upload Start
$path = "/home/falieson/www/gltest/portraits/";
$upload_file_name = "portrait";
if(copy($portrait,$path.$portrait_name))
{
$image = $path.$portrait_name;
?>
<xmp>
$currentimagesize = getimagesize($image);
</xmp>
<xmp>
$image_width = $currentimagesize[0];
$image_height = $currentimagesize[1];
</xmp>
<?php
if (($image_height > $max) || ($image_width > $max))
{
if ($image_height > $image_width)
{
$sizefactor = (double) ($max / $image_height);
}
else
{
$sizefactor = (double) ($max / $image_width);
}
}
$newwidth = (int) ($image_width * $sizefactor);
$newheight = (int) ($image_height * $sizefactor);
$newsize = $newwidth."x".$newheight;
$cmd = "/usr/X11R6/bin/mogrify -resize $newsize "."$path $newname 2>&1";
exec ($cmd, $exec_output, $exec_retval);
if($exec_retval > 0)
{
print "ERROR: exec() error: $exec_output[0]";
}
else
{
print "Image was resized from ".$image_width."x".$image_height." to $newsize ";
}
echo("Portrait succesfully uploaded");
}
else
{
$image = "{ $path}none.jpg";
echo("Portrait not submitted");
}
// Portrait Upload End
?>
The Problem is now this is what thats seen:
$currentimagesize = getimagesize($image);
$image_width = $currentimagesize[0];
$image_height = $currentimagesize[1];
ERROR: exec() error: Portrait succesfully uploaded
so.. I take it that the xmp tags aren't um.. working? xmp shouldn't be inside of php tags right? I have never used xmp before.