All Projects → jamiebicknell → Thumb

jamiebicknell / Thumb

Licence: mit
A simple, local image only, thumbnail generation script written in PHP

Projects that are alternatives of or similar to Thumb

Image
A PHP library to handle images
Stars: ✭ 898 (+654.62%)
Mutual labels:  gd
Zimg Host
Simple image hosting service
Stars: ✭ 62 (-47.9%)
Mutual labels:  gd
Ontopreplica
A real-time always-on-top “replica” of a window of your choice (on Windows).
Stars: ✭ 1,336 (+1022.69%)
Mutual labels:  thumbnails
Watimage
🖼 PHP image manipulation class
Stars: ✭ 25 (-78.99%)
Mutual labels:  gd
Java Thumbnailer
An extensible java library to create thumbnails of different file types (image, text)
Stars: ✭ 45 (-62.18%)
Mutual labels:  thumbnails
Simpleimage
A PHP class that makes working with images as simple as possible.
Stars: ✭ 1,184 (+894.96%)
Mutual labels:  gd
Image processing
High-level image processing wrapper for libvips and ImageMagick/GraphicsMagick
Stars: ✭ 600 (+404.2%)
Mutual labels:  thumbnails
Python Thumbnails
Thumbnails for Django, Flask and other Python projects. 🌈
Stars: ✭ 111 (-6.72%)
Mutual labels:  thumbnails
Sparkline
PHP script (using GD) to generate sparklines
Stars: ✭ 61 (-48.74%)
Mutual labels:  gd
Fb2mobi
[DEPRECATED] fb2mobi - derived from fb2conv 1.5.4
Stars: ✭ 89 (-25.21%)
Mutual labels:  thumbnails
Grafika
An image processing library for PHP
Stars: ✭ 838 (+604.2%)
Mutual labels:  gd
Smartcrop.php
smartcrop implementation in PHP
Stars: ✭ 37 (-68.91%)
Mutual labels:  gd
Mt
yet another media thumber. Generate Video Contat Sheets easily. http://mutschler.github.io/mt
Stars: ✭ 76 (-36.13%)
Mutual labels:  thumbnails
Flavy
Simple API for convert audio/video files, get thumbnails from video, information of files
Stars: ✭ 25 (-78.99%)
Mutual labels:  thumbnails
React Native Thumbnail Video
Easily show thumbnails for videos on react-native.
Stars: ✭ 104 (-12.61%)
Mutual labels:  thumbnails
Image
Manipulate images with an expressive API
Stars: ✭ 781 (+556.3%)
Mutual labels:  gd
Pdfthumbnails
A small script to generate thumbnail images for pdf files, based on pdf.js
Stars: ✭ 66 (-44.54%)
Mutual labels:  thumbnails
Justified Gallery
Javascript library to help creating high quality justified galleries of images. Used by thousands of websites as well as the photography community 500px.
Stars: ✭ 1,512 (+1170.59%)
Mutual labels:  thumbnails
Minecraft Avatar
PHP script (using GD) to generate avatar or skin from a Minecraft username
Stars: ✭ 104 (-12.61%)
Mutual labels:  gd
Fb2converter
Unified converter of FB2 files into epub2, kepub, mobi and azw3 formats.
Stars: ✭ 83 (-30.25%)
Mutual labels:  thumbnails

Thumb

A simple, local image only, thumbnail generation script written in PHP with a file based cache and optional browser based cache.

Example Usage

Firstly, make sure your cache directory is writable, then access the script like so:

<img src='thumb.php?src=./images/photo.jpg&size=400x300' />

Query Parameters

Key Example Value Default Description
src ./images/photo.jpg Absolute path, relative path, or local URL to the source image. Remote URLs are not allowed
size 100, 100x200, 100x, x100, <500 100 Width and/or height must be between 8 and 1500
crop 0 - 1 1 0 = Displays the entire image within the canvas
1 = Crop the image so that the entire canvas is used
trim 0 - 1 0 0 = Displays white space for unused canvas
1 = Removes any white space
zoom 0 - 1 0 For when the size of the canvas is larger than the original image size
0 = Will not enlarge image
1 = Enlarges image beyond the original image size
align c, t, r, b, l, tl, tr, br, bl c Alignment of image when cropped
sharpen 0 - 100 0 Percentage strength of the image sharpness, based on the percentage midpoint of 12 (strong) and 28 (weak)
gray 0 - 1 0 0 = Displays resized image as normal
1 = Converts image to grayscale
ignore 0 - 1 0 0 = Displays resized image as normal
1 = Displays original image file with the animation present

Size Parameter

Value Description
250 Creates a square image 250px in width and 250px in height
250x400 Creates an image 250px in width and 400px in height
250x Creates an image with a width of 250px and the height will be automatically calculated to maintain the aspect ration of the original image
x250 Createse an image with a height of 250px and the width will be automatically calculated to maintain the aspect ration of the original image
<800 Creates an image where the width or height does not exceed 800px. For landscape images the width will be 800px and the height will be automatically calculated, and for portrait images the height will be 800px and the width will be automatically calculated.

Automatic Orientation Correction

If you're dealing with images straight from a camera, some may contain EXIF data which specifies the original orientation the image should be viewed at.

To enable this feature, change the constant ADJUST_ORIENTATION to true.

More information, and an in depth analysis of EXIF Orientation can be found in this article written by @daveperrett

License

Thumb.php is licensed under the MIT license, see LICENSE.md for details.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].