Skip to content

gentrobot/PHP-image-scale

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 

Repository files navigation

PHP-image-scale

A simple PHP class for scaling images, keeping the aspect ratio intact.

Problem: Scale images of varying dimensions to fit within a pre-defined frame with fixed dimensions.

Uses:

  1. Include the class using PHP include.
  1. Create an object of the class and pass the name of the image file, width and height of the frame to fit in the scaled image.
  1. Call the scale image method.
scaleImage();?>
  1. Save image at the desired location in the desired file format with the desired output image quality.
save('name of the final image file to save',desired image quality from 0 to 100);

About

PHP class to scale an image that fits within a specified frame, without disturbing the aspect ratio.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages