HEX
Server: Apache/2.4.46 (Win64) OpenSSL/1.1.1j PHP/8.4.25
System: Windows NT DESKTOP-4TAV2RJ 10.0 build 19045 (Windows 10) AMD64
User: fred (0)
PHP: 8.4.25
Disabled: NONE
Upload Files
File: C:/xampp/htdocs/CC24/GraychartRGB.php
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>pp24 parsing</title>
</head>

<body class="oneColElsCtr">
<?php


$Gc=$_GET['Gc'];
$Gm=$_GET['Gm'];
$Gy=$_GET['Gy'];

//$Gc=$Gc/100*255;
//$Gm=$Gm/100*255;
//$Gy=$Gy/100*255;

//$Gc=128;
//$Gm=153;
//$Gy=153;
$Gc=255*(1-$Gc*0.01)*(1-0);
$Gm=255*(1-$Gm*0.01)*(1-0);
$Gy=255*(1-$Gy*0.01)*(1-0);

$f1=1*2.55;
$f2=2*2.55;

$s1='('.(255).','.(255).','.(255).',0)';
$s2='('.(128).','.(153).','.(153);
$s3='('.($Gc+$f2).','.($Gm+$f2).','.($Gy);
$s4='('.($Gc+$f2).','.($Gm+$f2).','.($Gy-$f1);
$s5='('.($Gc+$f2).','.($Gm+$f2).','.($Gy-$f2);
$s6='('.($Gc+$f2).','.($Gm+$f1).','.($Gy+$f2);
$s7='('.($Gc+$f2).','.($Gm+$f1).','.($Gy+$f1);
$s8='('.($Gc+$f2).','.($Gm+$f1).','.($Gy);
$s9='('.($Gc+$f2).','.($Gm+$f1).','.($Gy-$f1);
$s10='('.($Gc+$f2).','.($Gm+$f1).','.($Gy-$f2);
$s11='('.($Gc+$f2).','.($Gm).','.($Gy+$f2);
$s12='('.($Gc+$f2).','.($Gm).','.($Gy+$f1);
$s13='('.($Gc+$f2).','.($Gm).','.($Gy);
$s14='('.($Gc+$f2).','.($Gm).','.($Gy-$f1);
$s15='('.($Gc+$f2).','.($Gm).','.($Gy-$f2);
$s16='('.($Gc+$f2).','.($Gm-$f1).','.($Gy+$f2);
$s17='('.($Gc+$f2).','.($Gm-$f1).','.($Gy+$f1);
$s18='('.($Gc+$f2).','.($Gm-$f1).','.($Gy);
$s19='('.($Gc+$f2).','.($Gm-$f1).','.($Gy-$f1);
$s20='('.($Gc+$f2).','.($Gm-$f1).','.($Gy-$f2);
$s21='('.($Gc+$f2).','.($Gm-$f2).','.($Gy+$f2);
$s22='('.($Gc+$f2).','.($Gm-$f2).','.($Gy+$f1);
$s23='('.($Gc+$f2).','.($Gm-$f2).','.($Gy);
$s24='('.($Gc+$f2).','.($Gm-$f2).','.($Gy-$f1);
$s25='('.($Gc+$f2).','.($Gm-$f2).','.($Gy-$f2);

$sb1='('.$Gc.','.($Gm+$f2).','.($Gy+$f2);
$sb2='('.$Gc.','.($Gm+$f2).','.($Gy+$f1);
$sb3='('.$Gc.','.($Gm+$f2).','.($Gy);
$sb4='('.$Gc.','.($Gm+$f2).','.($Gy-$f1);
$sb5='('.$Gc.','.($Gm+$f2).','.($Gy-$f2);
$sb6='('.$Gc.','.($Gm+$f1).','.($Gy+$f2);
$sb7='('.$Gc.','.($Gm+$f1).','.($Gy+$f1);
$sb8='('.$Gc.','.($Gm+$f1).','.($Gy);
$sb9='('.$Gc.','.($Gm+$f1).','.($Gy-$f1);
$sb10='('.$Gc.','.($Gm+$f1).','.($Gy-$f2);
$sb11='('.$Gc.','.($Gm).','.($Gy+$f2);
$sb12='('.$Gc.','.($Gm).','.($Gy+$f1);
$sb13='('.$Gc.','.($Gm).','.($Gy);
$sb14='('.$Gc.','.($Gm).','.($Gy-$f1);
$sb15='('.$Gc.','.($Gm).','.($Gy-$f2);
$sb16='('.$Gc.','.($Gm-$f1).','.($Gy+$f2);
$sb17='('.$Gc.','.($Gm-$f1).','.($Gy+$f1);
$sb18='('.$Gc.','.($Gm-$f1).','.($Gy);
$sb19='('.$Gc.','.($Gm-$f1).','.($Gy-$f1);
$sb20='('.$Gc.','.($Gm-$f1).','.($Gy-$f2);
$sb21='('.$Gc.','.($Gm-$f2).','.($Gy+$f2);
$sb22='('.$Gc.','.($Gm-$f2).','.($Gy+$f1);
$sb23='('.$Gc.','.($Gm-$f2).','.($Gy);
$sb24='('.$Gc.','.($Gm-$f2).','.($Gy-$f1);
$sb25='('.$Gc.','.($Gm-$f2).','.($Gy-$f2);

$sc1='('.($Gc-$f2).','.($Gm+$f2).','.($Gy+$f2);
$sc2='('.($Gc-$f2).','.($Gm+$f2).','.($Gy+$f1);
$sc3='('.($Gc-$f2).','.($Gm+$f2).','.($Gy);
$sc4='('.($Gc-$f2).','.($Gm+$f2).','.($Gy-$f1);
$sc5='('.($Gc-$f2).','.($Gm+$f2).','.($Gy-$f2);
$sc6='('.($Gc-$f2).','.($Gm+$f1).','.($Gy+$f2);
$sc7='('.($Gc-$f2).','.($Gm+$f1).','.($Gy+$f1);
$sc8='('.($Gc-$f2).','.($Gm+$f1).','.($Gy);
$sc9='('.($Gc-$f2).','.($Gm+$f1).','.($Gy-$f1);
$sc10='('.($Gc-$f2).','.($Gm+$f1).','.($Gy-$f2);
$sc11='('.($Gc-$f2).','.($Gm).','.($Gy+$f2);
$sc12='('.($Gc-$f2).','.($Gm).','.($Gy+$f1);
$sc13='('.($Gc-$f2).','.($Gm).','.($Gy);
$sc14='('.($Gc-$f2).','.($Gm).','.($Gy-$f1);
$sc15='('.($Gc-$f2).','.($Gm).','.($Gy-$f2);
$sc16='('.($Gc-$f2).','.($Gm-$f1).','.($Gy+$f2);
$sc17='('.($Gc-$f2).','.($Gm-$f1).','.($Gy+$f1);
$sc18='('.($Gc-$f2).','.($Gm-$f1).','.($Gy);
$sc19='('.($Gc-$f2).','.($Gm-$f1).','.($Gy-$f1);
$sc20='('.($Gc-$f2).','.($Gm-$f1).','.($Gy-$f2);
$sc21='('.($Gc-$f2).','.($Gm-$f2).','.($Gy+$f2);
$sc22='('.($Gc-$f2).','.($Gm-$f2).','.($Gy+$f1);
$sc23='('.($Gc-$f2).','.($Gm-$f2).','.($Gy);
$sc24='('.($Gc-$f2).','.($Gm-$f2).','.($Gy-$f1);
$sc25='('.(0).','.(0).','.(0).',0)';
////////////////////////////////////////////////L50/////////////////////////////////////////////////////////////////////////////
$ccmd1='convert  ( -size 88x9 xc:rgb(0,0,0) +append ) ( -size 88x97 xc:rgb'.$s1.' +append ) ( -size 88x9 xc:rgb(0,0,0) +append ) ( -size 88x97 xc:rgb'.$s2.' +append ) ( -size 88x9 xc:rgb(0,0,0) +append ) ( -size 88x97 xc:rgb'.$s3.' +append ) ( -size 88x9 xc:rgb(0,0,0) +append ) ( -size 88x97 xc:rgb'.$s4.' +append ) ( -size 88x9 xc:rgb(0,0,0) +append ) ( -size 88x97 xc:rgb'.$s5.' +append ) ( -size 88x9 xc:rgb(0,0,0) +append ) ( -size 88x97 xc:rgb'.$s6.' +append ) ( -size 88x9 xc:rgb(0,0,0) +append ) ( -size 88x97 xc:rgb'.$s7.' +append ) ( -size 88x9 xc:rgb(0,0,0) +append ) ( -size 88x97 xc:rgb'.$s8.' +append ) ( -size 88x9 xc:rgb(0,0,0) +append ) ( -size 88x97 xc:rgb'.$s9.' +append ) ( -size 88x9 xc:rgb(0,0,0) +append ) ( -size 88x97 xc:rgb'.$s10.' +append ) ( -size 88x9 xc:rgb(0,0,0) +append ) ( -size 88x97 xc:rgb'.$s11.' +append ) ( -size 88x9 xc:rgb(0,0,0) +append ) ( -size 88x97 xc:rgb'.$s12.' +append ) ( -size 88x9 xc:rgb(0,0,0) +append ) ( -size 88x97 xc:rgb'.$s13.' +append ) ( -size 88x9 xc:rgb(0,0,0) +append ) ( -size 88x97 xc:rgb'.$s14.' +append ) ( -size 88x9 xc:rgb(0,0,0) +append ) ( -size 88x97 xc:rgb'.$s15.' +append ) ( -size 88x9 xc:rgb(0,0,0) +append ) ( -size 88x97 xc:rgb'.$s16.' +append ) ( -size 88x9 xc:rgb(0,0,0) +append ) ( -size 88x97 xc:rgb'.$s17.' +append ) ( -size 88x9 xc:rgb(0,0,0) +append ) ( -size 88x97 xc:rgb'.$s18.' +append ) ( -size 88x9 xc:rgb(0,0,0) +append ) ( -size 88x97 xc:rgb'.$s19.' +append ) ( -size 88x9 xc:rgb(0,0,0) +append ) ( -size 88x97 xc:rgb'.$s20.' +append ) ( -size 88x9 xc:rgb(0,0,0) +append ) ( -size 88x97 xc:rgb'.$s21.' +append ) ( -size 88x9 xc:rgb(0,0,0) +append ) ( -size 88x97 xc:rgb'.$s22.' +append ) ( -size 88x9 xc:rgb(0,0,0) +append ) ( -size 88x97 xc:rgb'.$s23.' +append ) ( -size 88x9 xc:rgb(0,0,0) +append ) ( -size 88x97 xc:rgb'.$s24.' +append ) ( -size 88x9 xc:rgb(0,0,0) +append ) ( -size 88x97 xc:rgb'.$s25.' +append )  -append p175.tif';

$ccmd2='convert  ( -size 88x9 xc:rgb(0,0,0) +append ) ( -size 88x97 xc:rgb'.$sb1.' +append ) ( -size 88x9 xc:rgb(0,0,0) +append ) ( -size 88x97 xc:rgb'.$sb2.' +append ) ( -size 88x9 xc:rgb(0,0,0) +append ) ( -size 88x97 xc:rgb'.$sb3.' +append ) ( -size 88x9 xc:rgb(0,0,0) +append ) ( -size 88x97 xc:rgb'.$sb4.' +append ) ( -size 88x9 xc:rgb(0,0,0) +append ) ( -size 88x97 xc:rgb'.$sb5.' +append ) ( -size 88x9 xc:rgb(0,0,0) +append ) ( -size 88x97 xc:rgb'.$sb6.' +append ) ( -size 88x9 xc:rgb(0,0,0) +append ) ( -size 88x97 xc:rgb'.$sb7.' +append ) ( -size 88x9 xc:rgb(0,0,0) +append ) ( -size 88x97 xc:rgb'.$sb8.' +append ) ( -size 88x9 xc:rgb(0,0,0) +append ) ( -size 88x97 xc:rgb'.$sb9.' +append ) ( -size 88x9 xc:rgb(0,0,0) +append ) ( -size 88x97 xc:rgb'.$sb10.' +append ) ( -size 88x9 xc:rgb(0,0,0) +append ) ( -size 88x97 xc:rgb'.$sb11.' +append ) ( -size 88x9 xc:rgb(0,0,0) +append ) ( -size 88x97 xc:rgb'.$sb12.' +append ) ( -size 88x9 xc:rgb(255,0,0) +append ) ( -size 88x97 xc:rgb'.$sb13.' +append ) ( -size 88x9 xc:rgb(0,0,0) +append ) ( -size 88x97 xc:rgb'.$sb14.' +append ) ( -size 88x9 xc:rgb(0,0,0) +append ) ( -size 88x97 xc:rgb'.$sb15.' +append ) ( -size 88x9 xc:rgb(0,0,0) +append ) ( -size 88x97 xc:rgb'.$sb16.' +append ) ( -size 88x9 xc:rgb(0,0,0) +append ) ( -size 88x97 xc:rgb'.$sb17.' +append ) ( -size 88x9 xc:rgb(0,0,0) +append ) ( -size 88x97 xc:rgb'.$sb18.' +append ) ( -size 88x9 xc:rgb(0,0,0) +append ) ( -size 88x97 xc:rgb'.$sb19.' +append ) ( -size 88x9 xc:rgb(0,0,0) +append ) ( -size 88x97 xc:rgb'.$sb20.' +append ) ( -size 88x9 xc:rgb(0,0,0) +append ) ( -size 88x97 xc:rgb'.$sb21.' +append ) ( -size 88x9 xc:rgb(0,0,0) +append ) ( -size 88x97 xc:rgb'.$sb22.' +append ) ( -size 88x9 xc:rgb(0,0,0) +append ) ( -size 88x97 xc:rgb'.$sb23.' +append ) ( -size 88x9 xc:rgb(0,0,0) +append ) ( -size 88x97 xc:rgb'.$sb24.' +append ) ( -size 88x9 xc:rgb(0,0,0) +append ) ( -size 88x97 xc:rgb'.$sb25.' +append )  -append p275.tif';

$ccmd3='convert  ( -size 88x9 xc:rgb(0,0,0) +append ) ( -size 88x97 xc:rgb'.$sc1.' +append ) ( -size 88x9 xc:rgb(0,0,0) +append ) ( -size 88x97 xc:rgb'.$sc2.' +append ) ( -size 88x9 xc:rgb(0,0,0) +append ) ( -size 88x97 xc:rgb'.$sc3.' +append ) ( -size 88x9 xc:rgb(0,0,0) +append ) ( -size 88x97 xc:rgb'.$sc4.' +append ) ( -size 88x9 xc:rgb(0,0,0) +append ) ( -size 88x97 xc:rgb'.$sc5.' +append ) ( -size 88x9 xc:rgb(0,0,0) +append ) ( -size 88x97 xc:rgb'.$sc6.' +append ) ( -size 88x9 xc:rgb(0,0,0) +append ) ( -size 88x97 xc:rgb'.$sc7.' +append ) ( -size 88x9 xc:rgb(0,0,0) +append ) ( -size 88x97 xc:rgb'.$sc8.' +append ) ( -size 88x9 xc:rgb(0,0,0) +append ) ( -size 88x97 xc:rgb'.$sc9.' +append ) ( -size 88x9 xc:rgb(0,0,0) +append ) ( -size 88x97 xc:rgb'.$sc10.' +append ) ( -size 88x9 xc:rgb(0,0,0) +append ) ( -size 88x97 xc:rgb'.$sc11.' +append ) ( -size 88x9 xc:rgb(0,0,0) +append ) ( -size 88x97 xc:rgb'.$sc12.' +append ) ( -size 88x9 xc:rgb(0,0,0) +append ) ( -size 88x97 xc:rgb'.$sc13.' +append ) ( -size 88x9 xc:rgb(0,0,0) +append ) ( -size 88x97 xc:rgb'.$sc14.' +append ) ( -size 88x9 xc:rgb(0,0,0) +append ) ( -size 88x97 xc:rgb'.$sc15.' +append ) ( -size 88x9 xc:rgb(0,0,0) +append ) ( -size 88x97 xc:rgb'.$sc16.' +append ) ( -size 88x9 xc:rgb(0,0,0) +append ) ( -size 88x97 xc:rgb'.$sc17.' +append ) ( -size 88x9 xc:rgb(0,0,0) +append ) ( -size 88x97 xc:rgb'.$sc18.' +append ) ( -size 88x9 xc:rgb(0,0,0) +append ) ( -size 88x97 xc:rgb'.$sc19.' +append ) ( -size 88x9 xc:rgb(0,0,0) +append ) ( -size 88x97 xc:rgb'.$sc20.' +append ) ( -size 88x9 xc:rgb(0,0,0) +append ) ( -size 88x97 xc:rgb'.$sc21.' +append ) ( -size 88x9 xc:rgb(0,0,0) +append ) ( -size 88x97 xc:rgb'.$sc22.' +append ) ( -size 88x9 xc:rgb(0,0,0) +append ) ( -size 88x97 xc:rgb'.$sc23.' +append ) ( -size 88x9 xc:rgb(0,0,0) +append ) ( -size 88x97 xc:rgb'.$sc24.' +append ) ( -size 88x9 xc:rgb(0,0,0) +append ) ( -size 88x97 xc:rgb'.$sc25.' +append )  -append p375.tif';



//$ccmd1='convert  ( -size 88x97 xc:rgb'.$sb1.' +append ) ( -size 88x9 xc:rgb(0,0,0) +append ) ( -size 88x97 xc:rgb'.$sb2.' +append ) ( -size 88x9 xc:rgb(0,0,0) +append ) ( -size 88x97 xc:rgb'.$sb3.' +append ) ( -size 88x9 xc:rgb(0,0,0) +append )   -append p175.tif';

exec($ccmd1) ;
exec($ccmd2) ;
exec($ccmd3) ;
$chartName="Gray".round($_GET['Gc'],0).round($_GET['Gm'],0).round($_GET['Gy'],0);

$ccmd='convert p175.tif p275.tif p375.tif -density 300x300 -units PixelsPerInch +append '.$chartName.'.tif';
exec($ccmd) ;


 
?>

<tr>

<br />
<td align="center"><font size="-2"> &copy; <a href="mailto:[email protected]">Fred Kuo</a>, 2010. All rights reserved.<br><a href="http://www.fredkuo.idv.tw/wordpress/?p=1025">Read more.</a><br>
</td>


</tr>
</body>


</html>