From: Gehua Y. <yan...@gm...> - 2011-11-13 23:41:36
|
On Sun, Nov 13, 2011 at 6:26 PM, Ian Scott <sc...@im...> wrote: > On 13/11/2011 22:44, Gehua Yang wrote: >> >> a) Can we make it a rule that the ordering of color is always RGB or >> RGBA when calling vil_save or vil_load? >> >> If yes, I can make changes to vil_bmp so that it returns the image >> view with planes in this order (by re-ordering the pixel color >> values). > > That seems like the sane approach. Anything else will lead to significant > extra complexity for the user. I would however be slightly more careful in > delimiting the rule, we don't to catch users who are loading non-RGB > multiplane data. And we don't want to have to reorder memory unless > necessary. > > for example: > "If you load or save an RGB or RGBA multiplane image, from a format that > explicitly handles RGB(A) images, then you can assume that the planes are > 0-Red, 1-Green, 2-Blue (and 3-Alpha). However, this does not guarantee that > Green, etc. comes after Red in memory." > > Ian. > > Agreed. For example, after loading a RGB image in bmp format, the plane_step will still be -1. Gehua. |