~adamzammit/quexf/main

« back to all changes in this revision

Viewing changes to functions/functions.image.php

  • Committer: Adam Zammit
  • Date: 2023-08-09 00:55:58 UTC
  • Revision ID: adam.zammit@acspri.org.au-20230809005558-lqwoupkldm5mmkc7
Tags: quexf-1.21.0
1.21.0 release - add PHP 8.1 support

Show diffs side-by-side

added added

removed removed

Lines of Context:
326
326
//and original page id
327
327
//given an image and the tlx,tly,trx,try,blx,bly,brx,bry as an array
328
328
//
329
 
function offset($image,$a,$compare = 1,$page)
 
329
function offset($image,$a,$compare,$page)
330
330
{
331
331
        $b = array();
332
332
        $c = array();
642
642
*
643
643
*
644
644
*/
645
 
function rotate($angle=false,$point,$centroid,$costheta=false,$sintheta=false)
 
645
function rotate($angle,$point,$centroid,$costheta=false,$sintheta=false)
646
646
{
647
647
        if ($angle !== false)
648
648
        {
917
917
      if ($ymax > $bry) $ymax = $bry;
918
918
    }
919
919
   
 
920
    $col = false;
 
921
    try {
920
922
    $col = imagecolorat($image, $x, $ymin);
921
 
 
 
923
     } catch (Exception $e) {
 
924
       $col = false;
 
925
     }
 
926
        if ($col !== false) {
922
927
                for($y = $ymin; $y < $ymax; $y += 1)
923
928
                {
924
929
                        $rgb = imagecolorat($image, $x, $y);
945
950
                        }
946
951
                        $width++;
947
952
                }
 
953
        }
948
954
 
949
955
        }
950
956