def get_fields(self): """Get a list of all the metadata fields on an image. Returns: [string] """ array = vips_lib.vips_image_get_fields(self.pointer) names = [] i = 0 while array[i] != ffi.NULL: name = _to_string(ffi.string(array[i])) names.append(name) glib_lib.g_free(array[i]) i += 1 glib_lib.g_free(array) return names
def get_suffixes(): """Get a list of all the filename suffixes supported by libvips. Returns: [string] """ names = [] if at_least_libvips(8, 8): array = vips_lib.vips_foreign_get_suffixes() i = 0 while array[i] != ffi.NULL: name = _to_string(array[i]) if name not in names: names.append(name) glib_lib.g_free(array[i]) i += 1 glib_lib.g_free(array) return names