Skip to content
forked from haaking/haathumb

haathumb is a timthumb caller via htaccess or web.config rewrite conditions

Notifications You must be signed in to change notification settings

Serosis/haathumb

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

haaThumb

haaThumb is a wrapper for timthumb allowing for prettier, SEO friendly URLs.

Example Usage

With htaccess rewrite:

<img src='thumb/400x300/src/path/to/img.jpg' />

Without htaccess rewrite:

<img src='haathumb.php?var=/400x300/src/path/to/img.jpg' />

Query Parameters

Key Example Value Default Description
src /path/to/img.jpg Absolute or relative path to the source image, no URLs allowed
size 100 | 320x240 | 320x | x240 100x100 Width and/or height must be between 1 and 1500
quality /quality/0-100/ 90 Reduce quality of the image to reduce filesize
fit /fit/ Resize to Fit specified dimensions (no cropping)
cropped /cropped/ (default) Crop and resize to best fit the dimensions
bordered /bordered/ Resize proportionally to fit entire image into specified dimensions, and add borders if required
aspect /aspect/ Resize proportionally adjusting size of scaled image so there are no borders gaps
align center | top | top-left | top-right | bottom | bottom-left | bottom-right | left | right /center/ Alignment of image when cropped
invert /invert/ Invert the image with the Negate filter
grayscale /grayscale/ Converts image to grayscale
brightness /brightness/-100 - 100/ Adjust brightness of image. Requires 1 argument to specify the amount of brightness to add. Values can be negative to make the image darker.
contrast /contrast/-100 - 100/ Adjust contrast of image. Requires one argument to specify the amount of contrast to apply. Positive values will reduce the contrast and negative values will increase the contrast.
colorize /colorize/128.0.0.127/ Apply a color wash to the image. The arguments are in RGBA
edge detect /edge-detect/ Uses edge detection to highlight the edges in the image.
emboss /emboss/ Embosses the image.
gaussian /gaussian/ Blurs the image using the Gaussian method.
selective /selective/ Blurs the image.
mean /mean/ Uses mean removal to achieve a "sketchy" effect.
smooth /smooth/0-100/ Makes the image smoother.
pixelate /pixelate/0-?.0-1/ Applies pixelation effect to the image, use arg1 to set the block size and arg2 to set the pixelation effect.
sharpen /sharpen/ Sharpen the image.
canvas color /canvas-color/ffffff/ ffffff Change background colour. Most used when changing the zoom and crop settings, which in turn can add borders to the image. Arguments in html hex color
canvas transparent /canvas-trans/ Use transparency and ignore background colour

Version

1.0

License

GNU General Public License, version 2 http://www.gnu.org/licenses/old-licenses/gpl-2.0.html

About

haathumb is a timthumb caller via htaccess or web.config rewrite conditions

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 99.8%
  • ApacheConf 0.2%