File tree Expand file tree Collapse file tree 2 files changed +33
-7
lines changed Expand file tree Collapse file tree 2 files changed +33
-7
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ it does more or less work.
24
24
25
25
` vips.c ` defines a simple but ugly route to call any libvips operation from PHP.
26
26
It uses libvips' own introspection facilities and does not depend on anything
27
- else (so no gobject-introspection, for example). It's a fairly short 1,200
27
+ else (so no gobject-introspection, for example). It's a fairly short 1,600
28
28
lines of C.
29
29
30
30
` vips.php ` is a PHP layer over the ugly ` vips.c ` API that tries to make a nice
@@ -125,18 +125,16 @@ See `examples/`.
125
125
126
126
### TODO
127
127
128
+ * ` [] ` for band extract should be easy
129
+
130
+ * can we overload ` () ` for ` getpoint ` ? unclear
131
+
128
132
* add phpDoc comments
129
133
130
134
need comments for magic properties
131
135
132
136
extra phpDoc comments for all magic methods, use py to generate
133
137
134
- * tests for at least some of the enum expansions
135
-
136
- * ` [] ` for band extract should be easy
137
-
138
- * can we overload ` () ` for ` getpoint ` ? unclear
139
-
140
138
* exceptions? logging?
141
139
142
140
### links
Original file line number Diff line number Diff line change
1
+ --TEST--
2
+ VImage::bandand works
3
+ --SKIPIF--
4
+ <?php if (!extension_loaded ("vips " )) print "skip " ; ?>
5
+ --FILE--
6
+ <?php
7
+ include 'vips.php ' ;
8
+
9
+ $ filename = dirname (__FILE__ ) . "/images/img_0076.jpg " ;
10
+ $ image = VImage::new_from_file ($ filename );
11
+
12
+ $ pass = TRUE ;
13
+
14
+ /* The original value of pixel (0, 0).
15
+ */
16
+ $ pixel = [39.1 , 39.5 , 34.9 ];
17
+
18
+ $ true = $ pixel [0 ] & $ pixel [1 ] & $ pixel [2 ];
19
+ if ($ image ->bandand ()->getpoint (0 , 0 ) != [$ true ]) {
20
+ $ pass = FALSE ;
21
+ }
22
+
23
+ if ($ pass ) {
24
+ echo "pass " ;
25
+ }
26
+ ?>
27
+ --EXPECT--
28
+ pass
You can’t perform that action at this time.
0 commit comments