+55 (11) 999150022
contato@sergiocardoso.org

18 / 07 / 2016

PHPicture
PHP OO Class

This class generate thumb from images with frienldy directives and settings from url on HREF attribute from IMG tag on HTML.

Required
  • PHP > 5.4;
  • PHP GD;

Getting Started

Configuration:

It’s necessary setup two folder on PHPicture.ini file:

  • [images_folder] – folder from all your images;
  • [cache_folder] – folder from a cache generation;
How its works:

Call all your images from HTML5 to PHPicture project. See the example below: If you install PHPicture project on the folder called myimg, and all your images are on the public/img folder, so change your HTML IMG SRC attribute to:

http://[absolute or relative path]/myimg/photo.png

Load the image from public/img folder.

http://[absolute or relative path]/myimg/photo-w:100-h:100.png

Resize this image to 100×100.

http://[absolute or relative path]/myimg/photo-w:140-h:120-b:e1e1e1.png

Resize this image to 140×120 and the fill the background with the hexdecimal color (b = background color parameter);

http://[absolute or relative path]/myimg/photo-f:jpg-q:9.png

Load image png in jpg format with 9 of compression. (q = quality parameter)

Version

1.0.0

comentários deste post

Leave a Reply

Your email address will not be published. Required fields are marked *

Sérgio Cardoso
Desenvolvedor de sistemas
e jogos em 3D
Desenvolvedor de sistemas (web e mobile), games e aplicativos 3D construíndo todo a arquitetura do projeto programando todo o backend e frontend assim como sua implementacao e documentacao.
certificações
download do currículo
dupla cidadania
projetos próprios
Contato
desenvolvimento
profissional
Entre em contato para orçamentos, consultoria ou planejamento de seus projetos web, mobile, games ou sistemas integrados ou para maiores detalhes sobre os projetos que desenvolvi.
TELEFONE: +55 11 999150022
E-MAIL: CONTATO@SERGIOCARDOSO.ORG
sérgio cardoso, made with in wordpress.