Table Of Contents

Previous topic

Common

Next topic

Pixel processing

This Page

IO

The IO module provides image file input and output. Notably:

  • if enabled at compilation time, yayi supports HDF5
  • extended support of TIFF (8, 16, 32 bits images)
  • extented support of PNG (16 bits images)
  • generic RAW image

Reference

YayiIOPython.image_from_numpy((object)array) → Image :

returns a new Yayi image with the same dimension, size, type and content as the provided array. The values of the array are copied

C++ signature :
yayi::IImage* image_from_numpy(_object*)
YayiIOPython.image_to_numpy((Image)image) → object :

returns a numpy array representation of the image (no copy is performed)

C++ signature :
boost::python::handle<_object> image_to_numpy(yayi::IImage*)
YayiIOPython.readJPG((str)arg1) → Image :

(filename) : returns the specified Jpeg image

C++ signature :
yayi::IImage* readJPG(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >)
YayiIOPython.readPNG((str)arg1) → Image :

(filename) : returns the specified Jpeg image

C++ signature :
yayi::IImage* readPNG(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >)
YayiIOPython.readRAW((str)arg1, (object)arg2, (type)arg3) → Image :

(filename, size, type) : returns the specified RAW image

C++ signature :
yayi::IImage* readRAW(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >,yayi::s_coordinate<0, int>,yayi::s_type_description)
YayiIOPython.readTIFF((str)arg1, (int)arg2) → Image :

(filename) : reads the specified TIFF image

C++ signature :
yayi::IImage* readTIFF(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >,int)
YayiIOPython.writeEPS((str)arg1, (Image)arg2) → object :

(filename, image) : writes the image into the specified EPS file

C++ signature :
yayi::s_return_code writeEPS(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >,yayi::IImage const*)
YayiIOPython.writeJPG((str)arg1, (Image)arg2) → object :

(filename, image) : writes the image into the specified file

C++ signature :
yayi::s_return_code writeJPG(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >,yayi::IImage const*)
YayiIOPython.writePNG((str)arg1, (Image)arg2) → object :

(filename, image) : writes the image into the specified file

C++ signature :
yayi::s_return_code writePNG(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >,yayi::IImage const*)
YayiIOPython.writeRAW((str)arg1, (Image)arg2) → object :

(filename, image) : writes the image into the specified file

C++ signature :
yayi::s_return_code writeRAW(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >,yayi::IImage const*)
YayiIOPython.writeTIFF((str)arg1, (Image)arg2) → object :

(filename, image) : writes the image into the specified file in TIFF format

C++ signature :
yayi::s_return_code writeTIFF(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >,yayi::IImage const*)