Serrated image when using class.upload.php

Asked

Viewed 14 times

0

I’m using the class class.upload.php to upload the images.

I inform you of the quality I desire $handle->jpeg_quality = 75;, but still the image is getting serrated. Link: https://github.com/verot/class.upload.php

inserir a descrição da imagem aqui

Someone can help me?

if (!empty($_FILES['avariaFoto']['name'])) {
  $files = array();
  foreach($_FILES['avariaFoto'] as $k => $l) {
    foreach($l as $i => $v) {
      if (!array_key_exists($i, $files)) $files[$i] = array();
      $files[$i][$k] = $v;
    }
  }
  foreach($files as $file) {
    $handle = new upload($file);
    if ($handle->uploaded) {
      $handle->file_new_name_body = date('dmYhis');
      $handle->image_resize = true;
      $handle->image_x = 800;
      $handle->image_ratio_y = true;
      $handle->jpeg_quality = 75;
      $handle->image_convert = 'jpg';
      $handle->file_overwrite = false;
      $handle->file_auto_rename = true;
      $handle->mime_check = true;
      $handle->Process('imagens/');
      $foto = $handle->file_dst_name;

      if ($handle->processed) {
        $handle->clean();
      } else {
        echo '  Erro: '.$handle - > error.
        '';
      }
    }
  }
}
  • What are the dimensions of the original image?

  • I’m taking it by cell phone.

  • Tested without Resizer to see if it works? There you can filter and know that the problem is exactly that.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.