-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample.php
More file actions
52 lines (47 loc) · 1.08 KB
/
Copy pathexample.php
File metadata and controls
52 lines (47 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<?php
include_once("colors.inc.php");
$ex=new GetMostCommonColors();
$ex->image="grass.jpg";
$colors=$ex->Get_Color();
$how_many=2;
$colors_key=array_keys($colors);
?>
<html>
<head>
</head>
<body>
<table border="1">
<tr><th colspan="3">test.jpg</th></tr>
<tr><td>Color</td><td>Count</td><td>Color value</td></tr>
<?php
echo "hello";
for ($i = 0; $i <= $how_many; $i++)
{
echo "<tr><td bgcolor=".$colors_key[$i]." width=16 height=16></td> <td>".$colors[$colors_key[$i]]."</td><td>$colors_key[$i]</td></tr>";
}
?>
<?php
$ex->image="grass.jpg";
$colors=$ex->Get_Color();
$how_many=5;
$colors_key=array_keys($colors);
?>
</table>
<table border="1">
<tr><th colspan="3">test2.jpg</th></tr>
<tr><td>Color</td><td>Count</td><td>Color value</td></tr>
<?php
for ($i = 0; $i <= $how_many; $i++)
{
echo "<tr><td bgcolor=".$colors_key[$i]." width=16 height=16></td> <td>".$colors[$colors_key[$i]]."</td><td>$colors_key[$i]</td></tr>";
}
echo "</table><br \>";
echo "_global.collection_color=[";
for ($i = 0; $i <= $how_many; $i++)
{
echo "0x".$colors_key[$i].", ";
}
echo "]";
?>
</body>
</html>