You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+55-3Lines changed: 55 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,9 +17,61 @@ http://local.im6.phpimagick.com - explicitly use ImageMagick 6
17
17
18
18
http://local.im7.phpimagick.com - explicitly use ImageMagick 7
19
19
20
-
21
20
It will take a few minutes (or more) to come up, as it has to compile ImageMagick 6 and 7, and then Imagick. After the first run, these are cached, so should only take a few seconds.
22
21
23
-
## PHPStorm stub file
22
+
The site is built against the master branch of Imagick at https://github.com/imagick/imagick . As it takes a long time, by default it doesn't rebuild from scratch each time. To force a rebuild against the latest version of Imagick
There is a list of which examples still need to be added at [phpimagick.com/todo](https://phpimagick.com/todo).
35
+
36
+
Here are some instructions on adding examples.
37
+
38
+
### Text example
39
+
40
+
A text example, is an example that has text as it's output, rather than an image e.g. Imagick::getImageMimeType has [an example added for it in this commit](https://github.com/Imagick/ImagickDemos/commit/9df6cef1051ab6fa90d1bf834a23d083bdf5ab79).
41
+
42
+
The steps involved are:
43
+
44
+
1. Add the example to appropriate list in src/example_list.php
For each entry in the array, the key is the example name and value is the example controller and example function name. Although most of the time these are the same some examples re-use a controller + function, as there isn't much point duplicating code. e.g. for ImagickDraw 'popClipPath' => 'setClipPath',
49
+
50
+
2. Create a controller
51
+
52
+
Usually copying an existing one is a good idea.
53
+
54
+
3. Mark the example code with a comment with the exact spelling like:
55
+
56
+
```
57
+
//Example Imagick::getImageMimeType
58
+
$imagick = new \Imagick($this->imageControl->getImagePath());
59
+
60
+
$output = 'Imagick::getImageMimeType result is: ';
61
+
$output .= $imagick->getImageMimeType();
62
+
63
+
return $output;
64
+
//Example end
65
+
```
66
+
67
+
This makes the example code be picked up and shown on the webpage.
68
+
69
+
70
+
71
+
### Standard image example
72
+
73
+
TODO - write words...
74
+
75
+
### Standard image example
24
76
25
-
TODO - move the instructions to the Imagick extension...
0 commit comments