t is urgent :
I need to fix images cropping and resizing in php and display them in a responsive gallery
Link : [login to view URL]
We want to show channels images in a grid mode (responsive) with a specific image ratio :
When the user upload the image, the script resize and crop it.
We want to fix it to crop the maximum width or height of the image and resize it.
Bid only if you can do it
this is a part of the resize function :
function PT_Resize_Crop_Image($max_width, $max_height, $source_file, $dst_dir, $quality = 100) {
$imgsize = @getimagesize($source_file);
$width = $imgsize[0];
$height = $imgsize[1];
$mime = $imgsize['mime'];
switch ($mime) {
case 'image/gif':
$image_create = "imagecreatefromgif";
$image = "imagegif";
break;
case 'image/png':
$image_create = "imagecreatefrompng";
$image = "imagepng";
break;
case 'image/jpeg':
$image_create = "imagecreatefromjpeg";
$image = "imagejpeg";
break;
default:
return false;
break;
}
$dst_img = @imagecreatetruecolor($max_width, $max_height);
$src_img = $image_create($source_file);
$width_new = $height * $max_width / $max_height;
$height_new = ($width * $max_height / $max_width) * 1.29;
if ($width_new > $width) {
$h_point = (($height - $height_new) / 2);
@imagecopyresampled($dst_img, $src_img, 0, 0, 0, $h_point, $max_width, $max_height, $width, $height_new);
} else {
$w_point = (($width - $width_new) / 2);
@imagecopyresampled($dst_img, $src_img, 0, 0, $w_point, 0, $max_width, $max_height, $width_new, $height);
}
@imagejpeg($dst_img, $dst_dir, $quality);
if ($dst_img)
@imagedestroy($dst_img);
if ($src_img)
@imagedestroy($src_img);
}
Thank you !
I have read the description and I can fix image size in php as per your requirements.
I have two years of web development experience.
I can do it asap.
Sir, i visited your website and check your paste code, i will complete job to crop channel images while user uploading i am available to star work now and finish within few hours. Thanx
⭐Dear Sir⭐
Nice to meet you.
I am interesting in your project.
I can build your project perfectly with my experience.
I am full time developer and my goal was always delivery perfectly results on time.
I will do my best for you.
Hope to hear you soon.
---⭐⭐⭐---
Dear client, how have you been?
I've read your project description carefully.
Presenting this proposal with 100% confident.
How about discuss in chat?
Waiting for your reply.
Best regards.
Hello,
My name is Doncho Indzhov. I am a web developer 6 years. I have skills with PHP5, HTML5, CSS3, Javascript, Jquery and more. My personal portfolio is www.donchoindzhov.com. You can check some of my last projects in Freelancer.com Profile - Portfolio section. I work for one company 3 years I do not here in Freelancer.com. Now I start working again and hope you have the interest to work together.
Thanks,
Best wishes!
Hi there,
I have checked the details. I have rich experience with CSS, HTML, Javascript, PHP. Please initiate the chat so we can discuss this job in detail. I am new to freelancer.com but I assure you that I can deliver your work in the best possible way. Best Regards
Hi There,
Am a full stack developer having 9+ years in software and web development.
I can achieve your requirements in high quality, performance and to be satisfied.
Hello, so do you know what size you want/need the image to be for the responsive display? If you do, please provide me that info for the purposes of the script. That way I can define the ratios for the crop prior to re-sizing the image. Thanks!