Convert Project Data to Format24bppRgb
Contents
[
Hide
Show
]Format24bppRgb specifies that the format is 24 bits per pixel; 8 bits each are used for the red, green, and blue components. Aspose.Tasks for C++ API has the capability to render a project to Format24bppRgb by providing the public property ImageSaveOptions.PixelFormat. Also, the horizontal and vertical resolution in dpi can be controlled using ImageSaveOptions.HorizontalResolution and ImageSaveOptions.VerticalResolution.
Rendering Project Data to Format24bppRgb and Controlling the Horizontal and Vertical Resolution
1System::SharedPtr<Project> project = System::MakeObject<Project>(dataDir + u"TestProject1.mpp");
2System::SharedPtr<ImageSaveOptions> options = System::MakeObject<ImageSaveOptions>(Aspose::Tasks::Saving::SaveFileFormat::TIFF);
3options->set_HorizontalResolution(72.0f);
4options->set_VerticalResolution(72.0f);
5options->set_PixelFormat(System::Drawing::Imaging::PixelFormat::Format24bppRgb);
6project->Save(dataDir + u"RenderProjectDataToFormat24bppRgb_out.tif", System::StaticCast<Aspose::Tasks::Saving::SaveOptions>(options));