Jump to content

Jassim

New Members
  • Posts

    2
  • Joined

  • Last visited

Jassim's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I am getting the following: IMAGE INTO START HERE ///// Array ( [ 0 ] => 1600 [ 1 ] => 900 [ 2 ] => 2 [ 3 ] => width="1600" height="900" [bits ] => 8 [channels ] => 3 [mime ] => image/jpeg ) ///// IMAGE INTO END HERE<br /> the original file is a JPG but I copying it as PNG to standarize it so the file on my FTP after moving is a PNG
  2. Hi, I am trying to create a mobile version of my already uploaded file using below code but getting this error imagecreatefrompng(): is not a valid PNG file Here is the code: if (move_uploaded_file($_FILES['photo']['tmp_name'], $uploadedFile)) { $resource = imagecreatefrompng($uploadedFile); $small_file = imagescale($resource , 500, 400); $small_file = imagepng($small_file); $newSmallFile = "mobile-" . $gallery_uuid . '.png'; $uploadedSmallFile = $uploaddir . $newSmallFile; echo $uploadedSmallFile; if (move_uploaded_file($small_file, $uploadedSmallFile)) { } else { echo json_encode("error"); } } else { echo json_encode("error"); } Kindly help.. Thanks, Jassim
×
×
  • 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.