PHP Classes

File: resize.php

Recommend this page to a friend!
  Classes of Rodrigo Brandão  >  Image Handling  >  resize.php  >  Download  
File: resize.php
Role: Example script
Content type: text/plain
Description: Example
Class: Image Handling
Resize, crop and add watermarks to images
Author: By
Last change:
Date: 11 years ago
Size: 1,141 bytes


Class file image Download
$_FILES["imagem"])) {
$img = new image;
// validade
// get errors
$erros = $img->error();
count($erros) == 0) {
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <form method="post" enctype="multipart/form-data">
        select a image
        <input name="imagem" type="file" size="25">
        <input type="submit" value="Submit">
    <?php if(isset($erros) && count($erros) != 0) : ?>
<?php foreach($erros as $erro) : ?>
<font color="#FF0000"><?php echo $erro ?></font><br>
        <?php endforeach; ?>
    <?php endif; ?>
<?php if(file_exists("resize.jpg")) : ?>
<a href="crop.php">click here to crop the image</a><br>
        <img src="resize.jpg">
    <?php endif ?>

For more information send a message to info at phpclasses dot org.