Я использую библиотеку Pylon от Basler, расширение GenICam.GenICam :: gcstring from int
Там они определили функцию для сохранения изображения, как:
virtual void Save (EImageFileFormat imageFileFormat, const String_t &filename, CImagePersistenceOptions *pOptions=NULL) const
Где String_t является продолжением GenICam :: gcstring
информация о gcstring ниже:
Portable string implementation. More...
#include <new>
#include <string>
#include <iostream>
#include <Base/GCTypes.h>
Classes
class GenICam::gcstring
A string class which is a clone of std::string. More...
Namespaces
GenICam
Contains definitions of GenICam types and exceptions.
Macros
#define GCSTRING_NPOS size_t(-1)
Indicates either 'not found' or 'all remaining characters'.
Functions
std::istream & GenICam::getline (std::istream &is, GenICam::gcstring &str)
std::istream & GenICam::getline (std::istream &is, GenICam::gcstring &str, char delim)
std::ostream & operator<< (std::ostream &ostr, const GenICam::gcstring &str)
std::istream & operator>> (std::istream &istr, GenICam::gcstring &str)
Мне нужно сохранить изображение с именем файла, созданным с помощью long int, и я пробовал так много способов, но не смог, кто может помочь?
@ user19703081 ознакомьтесь с документацией Basler. вы можете использовать openCV для сохранения изображения вместо использования встроенной функции. просмотрите страницу 9 в этом документе [ЗДЕСЬ] (http://s.baslerweb.com/media/documents/AW00136801000_Getting_Started_with_pylon5_and_OpenCV.pdf) –