Hi, i am developing a website but got stuck. I got couple of queries , I would appreciate if anyone can help me out.

1. is it possible to re-size image ( e.g on facebook thumbnail picture ) without loosing quality using php code.

2. If not is there third party tool i can use for image resizing on my website

Recommended Answers

All 3 Replies

Try using imagecopyresampled() instead of imagecopyresized() to lessen the degradation of quality. The process takes a little longer but if you aren't doing a large number of images on one page it shouldn't be all that noticeable.

Is there a way to scale image without losing quality?

You can save the resized file into PNG format, this will help to preserve quality. The length of the file will be higher than a JPG equivalent, but you can use some tools as optipng to compress the file without loosing quality. Or use JPG format also for the resized file and set quality over ~80%, this value usually returns a good looking file without artifacts.

Read this document, there you can find a lot of information about this topic: http://www.imagemagick.org/Usage/resize/

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.