Skip to content

timste/Customize-Images

Folders and files

NameName
Last commit message
Last commit date

Latest commit

author
Dario D. Müller
Aug 15, 2013
a4407a1 · Aug 15, 2013

History

6 Commits
Aug 15, 2013
Aug 15, 2013
Aug 15, 2013
Aug 15, 2013
Aug 15, 2013
Aug 15, 2013
Aug 15, 2013

Repository files navigation

Customize-Images

Info

Installation

  1. All files: .htaccess, index.php, class.customize-images.php and files-Folder
  2. Copy the whole folder including all files to your webserver or localhost.
  3. Visit in your browser: http://localhost/Customize-Images/files/testimage_w450_h250_c.jpg

How to use

  1. This Project make access to images with direct build-in croping and scaling of files
  2. It also represents a caching-functionality of the cropped & sliced images
  3. Access to an Image as usual "domain.com/files/[custom-path]/filename.jpg"
  4. All files (".htaccess" & php-files) can stored in directory "files/"

Browse to an image

  • /path/imagename.jpg (get image with original width & height)
  • /path/imagename_w400.jpg (get image with reduced width=400px)
  • /path/imagename_h250.jpg (get image with reduced height=250px)
  • /path/imagename_w400_h250.jpg (get image with width=400px and height=250px)
  • /path/imagename_h250_w400_c.jpg (select available mode = crop)
  • /path/imagename_h250_w500_d.jpg (select available mode = distort)
  • /path/imagename_h250_w600_s.jpg (select available mode = scale)
  • /path/imagename_w600.jpg?dev (caching is disabled if $env is 'DEV')

Mode

One Param of Filename can be a one-char string who set on of these Modes (crop- & distort-Modes requires both params (width and height)!)

  • s -> scale (scaling: use width und height as max-values, maintain proportions, requires only one length-param)
  • c -> crop (cropping: accept output data width and height, maintain proportions, cut too much of the scene)
  • d -> distort (distortion: use exactly width and height values)

Inspiration: Adaptive-Images

About

Image Crop- & Cut-System with Caching

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published