class.upload.php is a powerful and mature PHP class to manage uploaded files, and manipulate images in many ways. The script is available under a GPL license.
Sell, since there is a resizing, there a JPEG compression, and you loose in quality, it is normal. What you can do is change the jpeg_quality setting to have a better quality.Reply
Hi, I have try following still the same. $img_class->image_resize = false; $img_class->image_ratio_crop = false; $img_class->png_compression = 0; $img_class->jpeg_quality = 100;
//$img_class->log ====================== - class version : 0.33 - operating system : Linux - PHP version : 5.3.29 - GD version : 2.1.0 - supported image types : png jpg gif bmp - open_basedir : no restriction - upload_max_filesize : 1500M (1572864000 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/png by PHP getimagesize() function - MIME validated as image/png source variables - You can use all these before calling process() file_src_name : PHJ_GS_102972.png file_src_name_body : PHJ_GS_102972 file_src_name_ext : png file_src_pathname : /tmp/php1SmAPB file_src_mime : image/png file_src_size : 1467572 (max= 1572864000) file_src_error : 0 - source file is an image image_src_x : 1000 image_src_y : 667 image_src_pixels : 667000 image_src_type : png image_src_bits : 16 process file to /home/dewingssports/public_html/welcome2/Uploads/Product/b/ - file size OK - file mime OK : image/png - new file name body : Product-1476342636-4950-PHJ_GS_102972 - file name safe format - destination variables file_dst_path : /home/dewingssports/public_html/welcome2/Uploads/Product/b/ file_dst_name_body : Product-1476342636-4950-PHJ_GS_102972 file_dst_name_ext : png - no auto_rename if same filename exists - destination file details file_dst_name : Product-1476342636-4950-PHJ_GS_102972.png file_dst_pathname : /home/dewingssports/public_html/welcome2/Uploads/Product/b/Product-1476342636-4950-PHJ_GS_102972.png - no overwrite checking - image resizing or conversion wanted - source image is PNG - setting destination file type to png - auto-rotate requires function exif_read_data to be enabled - converting... - saving image... PNG image created image objects destroyed - process OKReply
I have try following still the same.
$img_class->image_resize = false;
$img_class->image_ratio_crop = false;
$img_class->png_compression = 0;
$img_class->jpeg_quality = 100;
//$img_class->log
======================
- class version : 0.33
- operating system : Linux
- PHP version : 5.3.29
- GD version : 2.1.0
- supported image types : png jpg gif bmp
- open_basedir : no restriction
- upload_max_filesize : 1500M (1572864000 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/png by PHP getimagesize() function
- MIME validated as image/png
source variables
- You can use all these before calling process()
file_src_name : PHJ_GS_102972.png
file_src_name_body : PHJ_GS_102972
file_src_name_ext : png
file_src_pathname : /tmp/php1SmAPB
file_src_mime : image/png
file_src_size : 1467572 (max= 1572864000)
file_src_error : 0
- source file is an image
image_src_x : 1000
image_src_y : 667
image_src_pixels : 667000
image_src_type : png
image_src_bits : 16
process file to /home/dewingssports/public_html/welcome2/Uploads/Product/b/
- file size OK
- file mime OK : image/png
- new file name body : Product-1476342636-4950-PHJ_GS_102972
- file name safe format
- destination variables
file_dst_path : /home/dewingssports/public_html/welcome2/Uploads/Product/b/
file_dst_name_body : Product-1476342636-4950-PHJ_GS_102972
file_dst_name_ext : png
- no auto_rename if same filename exists
- destination file details
file_dst_name : Product-1476342636-4950-PHJ_GS_102972.png
file_dst_pathname : /home/dewingssports/public_html/welcome2/Uploads/Product/b/Product-1476342636-4950-PHJ_GS_102972.png
- no overwrite checking
- image resizing or conversion wanted
- source image is PNG
- setting destination file type to png
- auto-rotate requires function exif_read_data to be enabled
- converting...
- saving image...
PNG image created
image objects destroyed
- process OK