One non-doctest related change was reverting back to ColorArray and ComponentArray associated types which was found to be more flexible than the -> impl ArrayLike return type as it lets the compiler figure out conditional trait impls in non-generic contexts.
For example the color_array() doc-test compiles with the associated types version but not the -> impl ArrayLike version since the compiler can figure out PartialEq is implemented on the first version but not the second:
One non-doctest related change was reverting back to
ColorArray
andComponentArray
associated types which was found to be more flexible than the-> impl ArrayLike
return type as it lets the compiler figure out conditional trait impls in non-generic contexts.For example the
color_array()
doc-test compiles with the associated types version but not the-> impl ArrayLike
version since the compiler can figure out PartialEq is implemented on the first version but not the second:I also added an implementation of
PixelComponent
forbool
which would possibly be used for binary images withGray<bool>
.The
README.md
usage section was also updated to show the new traits and how they can be used.