PHP Classes

File: examples/deskew.php

Recommend this page to a friend!
  Classes of Artur Graniszewski   GD2 Imaging   examples/deskew.php   Download  
File: examples/deskew.php
Role: Example script
Content type: text/plain
Description: Misc file.
Class: GD2 Imaging
Deskew and apply other advanced image effects
Author: By
Last change: Minor fixes.
Date: 12 years ago
Size: 389 bytes
 

Contents

Class file image Download
<?php

require_once('../gd2imaging.php');

if(isset(
$_GET['image']) && $_GET['image'] == 1) {
   
$image = new Image('test3.PNG');
   
$image->deskew(-1, true, $_GET['debug'] == 'true');
   
// turn deskewed image from horizontal to vertical.
   
$image->rotate(-90);

} else {
   
$image = new Image('test4.PNG');
   
$image->getSkewAngle(8, 256, true);
}
// deskew the image
$image->show();