decrease size of pictures in php
===

Im a php programmer and now I do a project in php. 
I need a class or API that can decrease size of picture without decreasing in scale and quality of picture , like “fileminimizer suite”.
for example this picture:

Thanks a lot .