PIFS stands for "PHP Image Framing Script". It resamples images so they fit into a frame whilst maintaining their original aspect ratio.
It can turn this:
More info can be found on the project's Github page. PIFS is open source for anyone that wishes to selfhost or modify the original code.