Fix image resizing and cropping with php

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";


case 'image/png':

$image_create = "imagecreatefrompng";

$image = "imagepng";


case 'image/jpeg':

$image_create = "imagecreatefromjpeg";

$image = "imagejpeg";



return false;



$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)


if ($src_img)



Thank you !

Taidot: PHP, CSS, HTML, Javascript

Näytä lisää: php image face cropping, resize crop image web software, php image resizing script upload service, php image resizing quality, php code automatic image resizing, image javascript cropping resizing, quality image resizing php freelance, image resizing php, php dynamic image resizing server, flash image cropping php upload save, fix image size uploading php, image cropping php, php image resizing rename, iphone resize crop image, image cropping php script

Tietoa työnantajasta:
( 39 arvostelua ) Croix-des-Bouquets, Haiti

Projektin tunnus: #20237338

20 freelanceria on tarjonnut keskimäärin 24$ tähän työhön


⭐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 Lisää

$50 USD 3 päivässä
(126 arvostelua)

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 1 päivässä
(88 arvostelua)

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 1 päivässä
(73 arvostelua)

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 1 päivässä
(27 arvostelua)

*******Hello, dear!!!********* please, give me chance of chatting. I will my best to make clients satisfied with good quality and to meet timeline. I will waiting for your reply.

$15 USD 7 päivässä
(11 arvostelua)

Hi Dear client. I am an expert with 12 years of experience in PHP and JavaScript. I am well-versed in PHP-extension (c++), V8 engine, PHP Javascript(v8js), Typescript, Ecmascript 6/7, angular, react and etc. Here are Lisää

$20 USD 1 päivässä
(6 arvostelua)

⭐⭐⭐⭐⭐Hello, How are you?⭐⭐⭐⭐⭐ I checked your project carefully, so that I feel very confident in your project because I am a talented web developer with 6 years. If you provide me all specification in detail, I can sta Lisää

$50 USD 1 päivässä
(12 arvostelua)

Hi, I am Afreen Ali. Thanks for the opportunity and for taking the time to review my bid.I have reviewed your requirements and I can design and build a website for your business I am expert in the website development Lisää

$20 USD 1 päivässä
(9 arvostelua)

Dear Client. I've just read your requirements description. Being an expert in php and js, I'm sure I can do your task perfectly. If you hire me, it will be a great chance for me and give you pleasure all day. I will wa Lisää

$20 USD 1 päivässä
(11 arvostelua)

Dear client! I have read your job description with great care and I am very interested. I can fulfill your task perfectly in a short time because I have many experiences and skills for your project. especiallyf html, c Lisää

$15 USD 1 päivässä
(10 arvostelua)

can I help you? I do many projects. You can contact with me via gmail: tuankiet2605 or skype: tuankiet2605. thanks.

$35 USD 1 päivässä
(3 arvostelua)

Hi, client. I'm professional full-time web developer who have got 8 of experience on various kinds of projects So I think I am a sutable developer for your project. My slogan is "Faster Speed + Loyal Quality + Saving T Lisää

$15 USD 1 päivässä
(11 arvostelua)

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 You can check some of my last projects Lisää

$20 USD 1 päivässä
(2 arvostelua)

Hi, Hope you are doing well! I would like to work on your project. I have excellent in skills with more than 6 Years experience. I'm sure that I will complete with high quality in the shortest time. I am always availab Lisää

$25 USD 7 päivässä
(5 arvostelua)

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 but I assure you that I can deliv Lisää

$20 USD 5 päivässä
(1 arvostelu)

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 1 päivässä
(1 arvostelu)

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 Lisää

$25 USD 1 päivässä
(0 arvostelua)

Hi. I will help you to complete the task. I have solved similar task recently. Will complete on time. Thank you.

$30 USD 1 päivässä
(0 arvostelua)

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 3 päivässä
(0 arvostelua)

⭐ Hello, Sir! ⭐ Nice to meet you. i am a full web developer with over 5 years on ****In SPECIAL Very familar with Website design, javascript, Bootstrap, Html5, React, VUEjs, Angular, Smart and Creatvie Lisää

$20 USD 2 päivässä
(0 arvostelua)