Mercurial > octave-libtiff
view examples/code/globaldemo.cc @ 31173:0abc9779f751
Tiff: modified readRGBAImage to use the orientation tag correctly
* __tiff__.cc (F__tiff_read_rgba_image__): modified the way the image
is read to use the orientation tag in the correct way.
author | magedrifaat <magedrifaat@gmail.com> |
---|---|
date | Tue, 16 Aug 2022 16:10:10 +0200 |
parents | 18fea1c5b21a |
children |
line wrap: on
line source
#include <octave/oct.h> #include <octave/interpreter.h> DEFMETHOD_DLD (globaldemo, interp, args, , "Global Demo") { if (args.length () != 1) print_usage (); octave_value retval; std::string s = args(0).string_value (); octave::symbol_table& symtab = interp.get_symbol_table (); octave_value tmp = symtab.global_varval (s); if (tmp.is_defined ()) retval = tmp; else retval = "Global variable not found"; symtab.global_assign ("a", 42.0); return retval; }