timholy/Images.jl — pull request #88 by lucasb-eyer (2014-04-25 22:06:03+00:00)
Title: Added `rgbim` in the vein of `grayim`.

Do not merge yet, it lacks documentation and tests, but I need some feedback first.

1. I felt the urge to also support ARGB arrays, because png with alpha channel are so common. But then, the name `rgbim` is not fitting anymore. Would you rather a) drop ARGB support and keep `rgbim` RGB-only, b) rename it `colorim`, c) create two functions: `rgbim` and `argbim` or d) still go with `rgbim`?

2. The implementation reminds me of FizzBuzz :) Trying to remove redundancy makes the code harder to follow. Is there any more Julian way to it?

With this, both `rgbim(convert(Array, imread(...png)))` and `rgbim(data(imread(...png)))` work as expected.