0

If I give phpthumbof an image with size of 78x78 and give these parameters: w=283&h=248&f=png&zc=1 it returns pixelated upresized image.

Source image: http://srv39820.ht-test.ru/28-5.icon-vk.png

Result image: http://srv39820.ht-test.ru/28-5.icon-vk_283x248_3c1.png

This problem came up after moving to other hosting. On previous one the result image was equal to source image.

1 Answers1

0

You should check image size before resizing.

list($width, $height) = getimagesize($source);  

now if width and height are smaller then required, don't resize and just save your image.

Dexa
  • 1,641
  • 10
  • 25
  • I understand. But on previous hosting phpthumbof was doing this routine himself. – Vlad Dryamov Sep 09 '13 at 12:11
  • Then read documentation of "phpthumbof" there are probably some server requirements I can't know it without looking at complete phpthumbof code. If that can't help, then ask phpthumbof support. – Dexa Sep 09 '13 at 12:22