iamregistered
Programmer
Greetings all,
I am working on a class to view images that are not stored in documentroot folders and the ability to create thumb-nails of the picture and saving them to a specific folder. The class is complete, but I've done a few changes to see the effects of it. But now I have stumbeld upon a problem, and I can't find the solution.
This is the code for displaying jpeg images:
It should be very easy to understand.
The code for gif files are almost identical apart from the code where it keeps the transparency when creating thumb-nails.
The problem that occurs is as follows: When I call upon the class to display a picture, either gif och jpeg, the progressbar stops at about half completion and the image will not present it self. However, when I press ESC then the image will show up.
Anyone have an idea what might cause this problem of mine?
Could it be something in my code, something in php.ini or my server? Apache 2.0.59 and php 4.4.4.
**
En solnedgång här
Med björkens dalande löv
Mörkret närmar sig
**
I am working on a class to view images that are not stored in documentroot folders and the ability to create thumb-nails of the picture and saving them to a specific folder. The class is complete, but I've done a few changes to see the effects of it. But now I have stumbeld upon a problem, and I can't find the solution.
This is the code for displaying jpeg images:
It should be very easy to understand.
Code:
function output_jpeg()
{
header("content-type: image/jpeg");
header("Content-Length: ".filesize($this->load_from));
$this->load_handle = imagecreatefromjpeg( $this->load_from );
if( $this->make_thumb )
{
$this->create_handle = imagecreatetruecolor( $this->new_width,$this->new_height );
imagecopyresized( $this->create_handle,$this->load_handle,0,0,0,0,$this->new_width,$this->new_height,$this->old_width,$this->old_height);
if( $this->save_thumb )
{
imagejpeg($this->create_handle,$this->thumb_path.$this->filename,$this->thumb_quality);
}
imagejpeg($this->create_handle,"",$this->thumb_quality);
imagedestroy( $this->create_handle );
}
else
{
imagejpeg( $this->load_handle );
}
imagedestroy( $this->load_handle );
}
The code for gif files are almost identical apart from the code where it keeps the transparency when creating thumb-nails.
The problem that occurs is as follows: When I call upon the class to display a picture, either gif och jpeg, the progressbar stops at about half completion and the image will not present it self. However, when I press ESC then the image will show up.
Anyone have an idea what might cause this problem of mine?
Could it be something in my code, something in php.ini or my server? Apache 2.0.59 and php 4.4.4.
**
En solnedgång här
Med björkens dalande löv
Mörkret närmar sig
**