The Go2Images was developed using the programming language PHP and the MVC design pattern. He works with the GD library to perform operations to resize and crop.
You can set the size the images should be resized, registering the width and height, the system finds all kinds of sizes and works with affiliates such information to perform the resize and crop the images.
In the go2images/db/migrate there are 4 files SQL:
- 001_create_db.sql
- 002_create_table_image_types.sql
- 003_create_table_images.sql
- 004_create_table_image_sizes.sql
Perform the above files in your MySQL database.
In the file go2images/db/DatabaseConnection.php to configure the data connection to your database:
...
// Attributes
private static $host = '';
private static $user = '';
private static $password = '';
private static $db = '';
...
All images are created in the directory public/images/system, so set the permissions:
chmod -R 777 public/images/system
Access: http://blog.patrickespake.com/2009/05/19/lab-go2images-resize-e-crop-de-imagens-no-formato-gif-png-ou-jpg/
Example: http://lab.patrickespake.com/go2images
O Go2Images foi desenvolvido usando a linguagem de programação PHP e o padrão de projeto MVC. Ele usa a biblioteca GD para realizar as operações de resize e crop.
Você pode definir os tamanhos que as imagens devem ser redimensionadas, cadastrando a largura e altura, os sistema verifica todos os tipos de tamanhos cadastrados e usa essas informações para efetuar o resize e crop da imagens.
No diretório go2images/db/migrate existem 4 arquivos SQL:
- 001_create_db.sql
- 002_create_table_image_types.sql
- 003_create_table_images.sql
- 004_create_table_image_sizes.sql
Execute os arquivos acima no seu banco de dados MySQL.
No arquivo go2images/db/DatabaseConnection.php configure os dados de conexão com o seu banco de dados:
...
// Atributos
private static $host = '';
private static $user = '';
private static $password = '';
private static $db = '';
...
Todas as imagens são criadas no diretório public/images/system, desta forma configure as permissões:
chmod -R 777 public/images/system
Acesse: http://blog.patrickespake.com/2009/05/19/lab-go2images-resize-e-crop-de-imagens-no-formato-gif-png-ou-jpg/
Exemplo: http://lab.patrickespake.com/go2images