Find Jobs
Hire Freelancers

Fix image resizing and cropping with php

$10-20 USD

Closed
Posted almost 5 years ago

$10-20 USD

Paid on delivery
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 !
Project ID: 20237338

About the project

11 proposals
Remote project
Active 5 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
11 freelancers are bidding on average $24 USD for this job
User Avatar
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.
$13 USD in 1 day
5.0 (746 reviews)
7.2
7.2
User Avatar
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
$15 USD in 1 day
5.0 (46 reviews)
6.7
6.7
User Avatar
Hi I am software engineer and full stack PHP developer your project is looking very interesting and I am looking forward to your message
$20 USD in 1 day
4.9 (160 reviews)
6.7
6.7
User Avatar
⭐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. ---⭐⭐⭐---
$50 USD in 3 days
4.9 (133 reviews)
6.1
6.1
User Avatar
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.
$25 USD in 1 day
4.6 (30 reviews)
4.9
4.9
User Avatar
can I help you? I do many projects. You can contact with me via gmail: tuankiet2605 or skype: tuankiet2605. thanks.
$35 USD in 1 day
5.0 (3 reviews)
3.7
3.7
User Avatar
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!
$20 USD in 1 day
5.0 (2 reviews)
2.2
2.2
User Avatar
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
$20 USD in 5 days
5.0 (1 review)
1.4
1.4
User Avatar
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.
$20 USD in 3 days
0.0 (0 reviews)
0.0
0.0
User Avatar
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!
$25 USD in 1 day
0.0 (0 reviews)
0.0
0.0

About the client

Flag of HAITI
Croix-des-Bouquets, Haiti
5.0
45
Payment method verified
Member since Mar 21, 2013

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.