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.
I try several solution, but no succes, I am not an experiment developer, sorry. (and my english is so bad !
Reminder, the upload works fine for, but there is no resizing ?
This is the result of the log :
Erreur : system information - class version : 0.35dev - operating system : WINNT - PHP version : 7.0.10 - GD version : 2.1.0 - supported image types : png jpg gif bmp - open_basedir : no restriction - upload_max_filesize : 2M (2097152 bytes) - language : en_GB source is an uploaded file - upload OK - file name OK determining MIME type - Checking MIME type with Fileinfo PECL extension MAGIC path defaults to C:\wamp64\bin\php\php7.0.10/extras/magic Fileinfo PECL extension failed (finfo_open) - Checking MIME type with UNIX file() command UNIX file() command not availabled - Checking MIME type with mime.magic file (mime_content_type()) MIME type detected as image/jpeg by mime_content_type() - MIME validated as image/jpeg source variables - You can use all these before calling process() file_src_name : moi2.jpg file_src_name_body : moi2 file_src_name_ext : jpg file_src_pathname : C:\wamp64\tmp\phpD1EF.tmp file_src_mime : image/jpeg file_src_size : 179820 (max= 2097152) file_src_error : 0 - source file is an image image_src_x : 470 image_src_y : 612 image_src_pixels : 287640 image_src_type : jpg image_src_bits : 8 process file to C:\wamp64\www\loladev/trombi/praxiling/miniatures/\ - file size OK - file mime OK : image/jpeg - new file name body : agent_1-07-09-2018 - new file name ext : jpg - destination variables file_dst_path : C:\wamp64\www\loladev/trombi/praxiling/miniatures/\ file_dst_name_body : agent_1-07-09-2018 file_dst_name_ext : jpg - no auto_rename if same filename exists - destination file details file_dst_name : agent_1-07-09-2018.jpg file_dst_pathname : C:\wamp64\www\loladev/trombi/praxiling/miniatures/\agent_1-07-09-2018.jpg - no overwrite checking - EXIF data is invalid or missing - image resizing or conversion wanted - source image is JPEG - setting destination file type to jpg - resizing... calculate y size image_src_x y : 470 x 612 image_dst_x y : 170 x 221 cancel resizing, as it would shrink the image! - converting... fills in transparency with default color - saving image... JPEG image created image objects destroyed - process OK process file to C:\wamp64\www\loladev/trombi/praxiling/hd/\ - file size OK - file mime OK : image/jpeg - new file name body : agent_1-07-09-2018 - new file name ext : jpg - destination variables file_dst_path : C:\wamp64\www\loladev/trombi/praxiling/hd/\ file_dst_name_body : agent_1-07-09-2018 file_dst_name_ext : jpg - no auto_rename if same filename exists - destination file details file_dst_name : agent_1-07-09-2018.jpg file_dst_pathname : C:\wamp64\www\loladev/trombi/praxiling/hd/\agent_1-07-09-2018.jpg - no overwrite checking - EXIF data is invalid or missing - image resizing or conversion wanted - source image is JPEG - setting destination file type to jpg - resizing... calculate y size image_src_x y : 470 x 612 image_dst_x y : 470 x 612 - converting... fills in transparency with default color - saving image... JPEG image created image objects destroyed - process OK cleanup - delete temp file C:\wamp64\tmp\phpD1EF.tmpReply
Re: Resize image works with v030 but not with v0.34 new!
The image is properly detected as image, with dimensions of 470x612
- MIME validated as image/jpeg - source file is an image image_src_x : 470 image_src_y : 612
The first image is created, but resizing doesn't happen because the created image would be smaller than the original image. Use image_ratio rather than image_ratio_no_zoom:
- file_dst_pathname : C:\wamp64\www\loladev/trombi/praxiling/miniatures/\agent_1-07-09-2018.jpg - resizing... calculate y size image_src_x y : 470 x 612 image_dst_x y : 170 x 221 cancel resizing, as it would shrink the image!
The second image is created,but is not resized as the new image size would be the same as the old image size:
- file_dst_pathname : C:\wamp64\www\loladev/trombi/praxiling/hd/\agent_1-07-09-2018.jpg - resizing... calculate y size image_src_x y : 470 x 612 image_dst_x y : 470 x 612Reply
I use Codeigniter from several years and add class.upload as a librairie.
Works fine.
I replace by v0.34 and I use the same code, but there is no resize.
I try several solution, but no succes, I am not an experiment developer, sorry.
(and my english is so bad !
Reminder, the upload works fine for, but there is no resizing ?
This is the result of the log :
Erreur : system information
- class version : 0.35dev
- operating system : WINNT
- PHP version : 7.0.10
- GD version : 2.1.0
- supported image types : png jpg gif bmp
- open_basedir : no restriction
- upload_max_filesize : 2M (2097152 bytes)
- language : en_GB
source is an uploaded file
- upload OK
- file name OK
determining MIME type
- Checking MIME type with Fileinfo PECL extension
MAGIC path defaults to C:\wamp64\bin\php\php7.0.10/extras/magic
Fileinfo PECL extension failed (finfo_open)
- Checking MIME type with UNIX file() command
UNIX file() command not availabled
- Checking MIME type with mime.magic file (mime_content_type())
MIME type detected as image/jpeg by mime_content_type()
- MIME validated as image/jpeg
source variables
- You can use all these before calling process()
file_src_name : moi2.jpg
file_src_name_body : moi2
file_src_name_ext : jpg
file_src_pathname : C:\wamp64\tmp\phpD1EF.tmp
file_src_mime : image/jpeg
file_src_size : 179820 (max= 2097152)
file_src_error : 0
- source file is an image
image_src_x : 470
image_src_y : 612
image_src_pixels : 287640
image_src_type : jpg
image_src_bits : 8
process file to C:\wamp64\www\loladev/trombi/praxiling/miniatures/\
- file size OK
- file mime OK : image/jpeg
- new file name body : agent_1-07-09-2018
- new file name ext : jpg
- destination variables
file_dst_path : C:\wamp64\www\loladev/trombi/praxiling/miniatures/\
file_dst_name_body : agent_1-07-09-2018
file_dst_name_ext : jpg
- no auto_rename if same filename exists
- destination file details
file_dst_name : agent_1-07-09-2018.jpg
file_dst_pathname : C:\wamp64\www\loladev/trombi/praxiling/miniatures/\agent_1-07-09-2018.jpg
- no overwrite checking
- EXIF data is invalid or missing
- image resizing or conversion wanted
- source image is JPEG
- setting destination file type to jpg
- resizing...
calculate y size
image_src_x y : 470 x 612
image_dst_x y : 170 x 221
cancel resizing, as it would shrink the image!
- converting...
fills in transparency with default color
- saving image...
JPEG image created
image objects destroyed
- process OK
process file to C:\wamp64\www\loladev/trombi/praxiling/hd/\
- file size OK
- file mime OK : image/jpeg
- new file name body : agent_1-07-09-2018
- new file name ext : jpg
- destination variables
file_dst_path : C:\wamp64\www\loladev/trombi/praxiling/hd/\
file_dst_name_body : agent_1-07-09-2018
file_dst_name_ext : jpg
- no auto_rename if same filename exists
- destination file details
file_dst_name : agent_1-07-09-2018.jpg
file_dst_pathname : C:\wamp64\www\loladev/trombi/praxiling/hd/\agent_1-07-09-2018.jpg
- no overwrite checking
- EXIF data is invalid or missing
- image resizing or conversion wanted
- source image is JPEG
- setting destination file type to jpg
- resizing...
calculate y size
image_src_x y : 470 x 612
image_dst_x y : 470 x 612
- converting...
fills in transparency with default color
- saving image...
JPEG image created
image objects destroyed
- process OK
cleanup
- delete temp file C:\wamp64\tmp\phpD1EF.tmp
The image is properly detected as image, with dimensions of 470x612
- MIME validated as image/jpeg
- source file is an image
image_src_x : 470
image_src_y : 612
The first image is created, but resizing doesn't happen because the created image would be smaller than the original image. Use image_ratio rather than image_ratio_no_zoom:
- file_dst_pathname : C:\wamp64\www\loladev/trombi/praxiling/miniatures/\agent_1-07-09-2018.jpg
- resizing...
calculate y size
image_src_x y : 470 x 612
image_dst_x y : 170 x 221
cancel resizing, as it would shrink the image!
The second image is created,but is not resized as the new image size would be the same as the old image size:
- file_dst_pathname : C:\wamp64\www\loladev/trombi/praxiling/hd/\agent_1-07-09-2018.jpg
- resizing...
calculate y size
image_src_x y : 470 x 612
image_dst_x y : 470 x 612