Changeset 9
- Timestamp:
- 10/26/2008 4:39:47 PM (13 months ago)
- Location:
- gilx/trunk
- Files:
-
- 2 modified
-
options.py (modified) (1 diff)
-
src/test/test_gil_image_of_regular_type.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
gilx/trunk/options.py
r3 r9 1 variant = 'all' -
gilx/trunk/src/test/test_gil_image_of_regular_type.cpp
r8 r9 13 13 template<class Regular> 14 14 void test_type(){ 15 //A single channel type should be both planar and interleaved, so I16 //am inclined to pass 'true' for planar. Niether option actually compiles.17 18 15 19 16 typedef boost::gil::image<float> float_image; 20 17 typedef float_image::view_t float_view; 21 18 22 float_image img_(256, 256, 0.0f); 19 //NOTE: The last argument is necessary 20 // -- gil assumes the 3rd arg. is the alignment otherwise. 21 float_image img_(256, 256, 1.0f, 0u); 23 22 float_view img = view(img_); 23 24 //Verify image constructed properly (suggested by Nathan Stien). 25 I3DEA_CHECK_EQUAL(std::count(img.begin(), img.end(), 1.0f), 256*256); 24 26 25 27 for (int r = 0; r < img.height(); ++r) { … … 31 33 } 32 34 33 I3DEA_CHECK_ ALMOST_EQUAL(img(128, 128), 3.0f, 0.001);35 I3DEA_CHECK_EQUAL(img(128, 128), 4.0f); 34 36 35 37 float_view::locator loc; 36 38 loc = img.xy_at(128, 128); 37 I3DEA_CHECK (*loc == 3.0f);39 I3DEA_CHECK_EQUAL(*loc, 4.0f); 38 40 } 39 41