From: Torsten W. <wie...@tn...> - 2002-07-05 15:06:22
|
Hello, > I am not familiar with the vil class hierarchy, so I can't see how > to easily patch this problem. There might be some more problems > with get_section() and put_section(). If there are no side effects caused by get_section() and put_section() this (not very elegant) extension to vil_load can solve the problem of changing components and flipping rows: vil_image vil_load(char const* filename) { vil_image i =3D vil_load_raw(filename); bool top_first, bgr; if ( i.get_property(vil_property_top_row_first, &top_first) && !top_f= irst && i.components() =3D=3D 3 && i.get_property(vil_property_component= _order_is_BGR,&bgr) && bgr) { i =3D vil_flipud(i); i =3D vil_flip_components(i); } else { if (i.get_property(vil_property_top_row_first, &top_first) && !top_fi= rst) i =3D vil_flipud(i); if (i.components() =3D=3D 3 && i.get_property(vil_property_component_= order_is_BGR,&bgr) && bgr) i =3D vil_flip_components(i); } return i; } Best regards, Torsten --=20 ---------------------------------------------------------------------- Dipl.-Ing. Torsten Wiebesiek Universitaet Hannover Institut fuer Theoretische Nachrichtentechnik und Informationsverarbeitung Phone:=09+49-511-762-5328 (Fax: -5333) E-Mail:=09w...@tn... WWW:=09http://www.tnt.uni-hannover.de/~wiebesiek |