- version:aspose-slides-cpp-windows-23.1
- The fill color obtained by the following code is incorrect
void SaveShapeImage(System::String pptFilePath)
{
System::SharedPtr<System::IO::FileStream> stream = System::MakeObject<System::IO::FileStream>(pptFilePath, System::IO::FileMode::Open, System::IO::FileAccess::Read, System::IO::FileShare::ReadWrite);
System::SharedPtr<Aspose::Slides::Presentation> presentation = System::MakeObject<Aspose::Slides::Presentation>(stream);
System::SharedPtr<ISlideCollection> slides = presentation->get_Slides();
for (int slideIdx = 0; slideIdx < slides->get_Count(); slideIdx++)
{
System::SharedPtr<Aspose::Slides::ISlide> slide = slides->idx_get(slideIdx);
System::SharedPtr<IShapeCollection> shapes = slide->get_Shapes();
for (int i = 0, n = shapes->get_Count(); i < n; i++)
{
System::SharedPtr<IShape> shape = shapes->idx_get(i);
System::SharedPtr<System::Drawing::Bitmap> bitmap = shape->GetThumbnail();
//TODO:Save picture to file
}
}
}
original data:
src.png (7.8 KB)
thumbnail data:
error.png (13.6 KB)
- There are two problems with images saved through shape thumbnail
- 1、Picture blank
- 2、Wrong picture content
resource:desing.zip (138.2 KB)