Reputation:
So I was adding some image upload functionality to my website and I decided to go with the PHP Image Magician Library by Jarrod Oberto
Resizing a 1080 pixel wide image to 480 pixels works like a charm. However resizing the image to 720 pixels results in an unexpected crop.
Whatever shall I do to make the 720 pixel image resize perfectly?
The code Im using for he resize is;
<?php
$magicianObj = new imageLib("original.jpg");
$magicianObj -> resizeImage(480, 800);
$magicianObj -> saveImage("480.jpg", 100);
$magicianObj -> resizeImage(720, 1280);
$magicianObj -> saveImage("720.jpg", 100);
Here are the images:
Upvotes: 0
Views: 462
Reputation: 33813
Does it make any difference if you resize firstly to 720 and save it then resize to 480 and save?
$magicianObj = new imageLib("original.jpg");
$magicianObj -> resizeImage(720, 1280);
$magicianObj -> saveImage("720.jpg", 100);
$magicianObj -> resizeImage(480, 800);
$magicianObj -> saveImage("480.jpg", 100);
Upvotes: 1