Re: imagecreatetruecolor error.

See all posts Reply

Re: imagecreatetruecolor error. new!
by taha, 11 years, 2 months ago
Hello.

I receive the error line imagecreatetruecolor.

Function name : imagecreatenew

Picture Adress : http://www.milenyum.tv/error/DSC_3398.JPG

My Upload Function :

function imageUpload($file, $upadres, $w, $h, $ratio_fill,$png = false) {
  $upload = new upload($file);
  if ($upload->uploaded) {
    $upload->file_new_name_body = md5($upload->file_src_name_body);
    $upload->file_auto_rename = true;
    $upload->image_resize = true;
    if ($h > 0) {
      $upload->image_x = $w;
      $upload->image_y = $h;
    } else {
      $upload->image_x = $w;
      $upload->image_ratio_y = true;
    }
    if($png)
      $upload->image_convert = 'png';
    if ($ratio_fill>0) {
      $upload->image_ratio_fill = $ratio_fill;
      $upload->image_background_color = null;
    }
    $upload->process($upadres);
  }
  return $upload->file_dst_name;
}


Please help.

ThanksReply
Re: imagecreatetruecolor error. new!
by taha, 11 years, 2 months ago
Other parameters :

$ratio_fill = "";
$png = false;Reply
Re: imagecreatetruecolor error. new!
by colin, 11 years, 2 months ago
What is the actual error that you have?Reply
Re: imagecreatetruecolor error. new!
by taha, 11 years, 2 months ago
When I try to upload the attached picture, imagecreatetruecolor method does not continue after the transactions.Reply
Re: imagecreatetruecolor error. new!
by colin, 11 years, 2 months ago
What do you mean by that? The PHP process crashes? You have a blank page? Do you have an error message in the web server's logs? Do you have an error message on screen? Do you have an error number/message?Reply
Re: imagecreatetruecolor error. new!
by taha, 11 years, 2 months ago
Log :

system information
- class version : 0.32
- operating system : Linux
- PHP version : 5.3.25
- GD version : 2.1.0
- supported image types : png jpg gif bmp
- open_basedir : /home/milenyum:/usr/lib/php:/usr/php4/lib/php:/usr/local/lib/php:/usr/local/php4/lib/php:/tmp
- upload_max_filesize : 32M (33554432 bytes)
- language : en_GB
source is an uploaded file
- upload OK
- file name OK
determining MIME type
- Checking MIME type with Fileinfo PECL extension
    Fileinfo PECL extension not available
- Checking MIME type with UNIX file() command
    PHP exec() function is disabled
- Checking MIME type with mime.magic file (mime_content_type())
    mime_content_type() is not available
- Checking MIME type with getimagesize()
    MIME type detected as image/jpeg by PHP getimagesize() function
- MIME validated as image/jpeg
source variables
- You can use all these before calling process()
    file_src_name : DSC_3398.JPG
    file_src_name_body : DSC_3398
    file_src_name_ext : jpg
    file_src_pathname : /tmp/php7UV8Ti
    file_src_mime : image/jpeg
    file_src_size : 627588 (max= 33554432)
    file_src_error : 0
- source file is an image
    image_src_x : 3008
    image_src_y : 2000
    image_src_pixels : 6016000
    image_src_type : jpg
    image_src_bits : 8
process file to ../media/foto/thumb/
- file size OK
- file mime OK : image/jpeg
- new file name body : 75aa906f32b288839f4035d389dc7637
- file name safe format
- destination variables
    file_dst_path : ../media/foto/thumb/
    file_dst_name_body : 75aa906f32b288839f4035d389dc7637
    file_dst_name_ext : jpg
- checking for auto_rename
    auto_rename to 75aa906f32b288839f4035d389dc7637_2.jpg
- destination file details
    file_dst_name : 75aa906f32b288839f4035d389dc7637_2.jpg
    file_dst_pathname : ../media/foto/thumb/75aa906f32b288839f4035d389dc7637_2.jpg
- 75aa906f32b288839f4035d389dc7637_2.jpg doesn't exist already
- image resizing or conversion wanted
- source image is JPEG
- setting destination file type to jpg
- resizing...
    use plain sizes




######################

but, 3285 ($.dst_im = imagecreatetruecolor($x, $y);) - After the line does not continue. something that does not fall a logReply
Re: imagecreatetruecolor error. new!
by colin, 11 years, 2 months ago
It looks like you are running out of memory.

Search for memory in the site, or click here.

You can also check this post.Reply
Re: imagecreatetruecolor error. new!
by taha, 11 years, 2 months ago
thnx.Reply
Re: imagecreatetruecolor error. new!
by taha, 11 years, 2 months ago
thnx.Reply
Re: imagecreatetruecolor error. new!
by taha, 11 years, 2 months ago
thnx.Reply