WorldWideScripts.net Delivering the best Add-Ons in more than 37 languages.

中文(简体), English, हिन्दी/हिंदी, Español/Castellano, العربية, Русский язык, Français, 中文 (台灣), বাংলা, Bahasa Indonesia, اردو, Português, Deutsch, Bahasa Melayu (بهاس ملايو‎), 日本語 (にほんご), فارسی, Italiano, తెలుగు, Türkçe, ગુજરાતી, Język polski/polszczyzna, Tiếng Việt, ಕನ್ನಡ, Українська мова, ไทย
PHP Scripts / Images and Media

ThumbnailCreator

— Add-On to WorldWideScripts.net

Subscribe to our feed to stay up to date!

New! Follow us as you want it!


ThumbnailCreator - CodeCanyon Item for Sale

Ads

Ad: Bluehost hosting

A simple library that can create thumbnails from various file types, by use of ThumbnailProviders. Easily extendable with your own ThumbnailProviders.

Out of the box it can create thumbnails from Text files and image files as well as watermarked images. Also to add a provider just created a PHP class that implements IThumbnailProvider to add your own ThumbnailProvider.

ThumbnailProvider is easy to use, it’s as simple as this.

 <?php include "ThumbnailCreator.php"; $thumbCreator = new ThumbnailCreator(); $thumbCreator->createThumbnail("textfile.txt", "textFileThumb.png"); $thumbCreator->createThumbnail("imagefile.jpg", "imageFileThumb.jpg", 128, 128);?> 

Change Log

Version 1.0 Released – 14 Oct 2010

Version 1.0.1 Released – 15 Oct 2010

  • Changed IThumbnailProvider::fromFile to IThumbnailProvider::create
  • Changed to leave image saving upto thumbnail provider, to allow for use of other image libs
  • Wrote documentaion, as you can see :)
  • Added checks that width and height are actually numeric values
  • Added checks that the file in question actually exists
  • Scale Text thumbnails proportional to an 8.5×11 piece of paper.

Version 1.2 Release – 11 Nov, 2012

  • Changed ImageThumbnailProvider to use original dimensions when thumbnail dimensions are 0 or null
  • Added class GDThumnailProviderBase to hold basic methods when creating a provider that uses the GD library
  • Added class WatermarkThumbnailProvider to built-in providers
  • Added $useProvider arg to ThumbnailCreator::createThumbnail to use a specific provider when creating a thumbnail.
  • Changed font scaling for TextThumbnailProvider. Now scales to a 26 font equivalent on 8.5×11.
  • Added wordwrapping to TextThumbnailProvider as well as the propery $WordWrap, to en/disable.
  • Fixed an issue with width scaling in TextThumbnailProvider.

Download
Other components in this categoryAll components of this author
CommentsFrequently asked questions and answers

Properties

Created:
19 October 10

Last Update:
N/A

High Resolution:
No

Compatible Browsers:
IE6, IE7, IE8, IE9, Firefox, Safari, Opera, Chrome

Files Included:
PHP

Software Version:
PHP 5.x

Keywords

eCommerce, All Items, extendable, image, text, thumbnail generation, watermark