cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 
2024 Technology Preview Program

2024 Technology Preview Program:
Master powerful new features and shape the latest BIM-enabled innovations

Archicad C++ API
About Archicad add-on development using the C++ API.

Saving NativeImage to a file

dushyant
Enthusiast

Hello!

Is there a way to save a NewDisplay::NativeImage into a file? 

Thanks.

2 REPLIES 2
kovacsv
Booster

You can create a GX::Image from a NewDisplay::NativeImage, and then save it to a file.

 

Something like this:

GX::Image textureImage (nativeImage);

FTM::GeneralID pngType = FTM::FileTypeManager::SearchForMime ("image/png", nullptr);
textureImage.WriteToFile (resultFileLocation, pngType);

 

 

Thank you!