If you intend to export images using GanttChartExporter component from Project Management Framework, and your have large task sets and/or long timeline pages, you should paginate output in a loop to improve performance and decrease memory consumption instead of trying to obtain a very large image in a single call. Here is some sample code which you may use to achieve that:
// Assuming you have a task manager component instance with items set to the tasks you need to export Gantt Chart image for.
var ganttChartExporter = new GanttChartExporter(taskManager, (control) => { [...] });
double pageWidth = 1024, pageHeight = 2048; // Use your desired page size.
int verticalPageCount = ganttChartExporter.GetVerticalPageCount(pageWidth, pageHeight);
int horizontalPageCount = ganttChartExporter.GetHorizontalPageCount(pageWidth, pageHeight);
for (int i = 0; i < horizontalPageCount; i++)
{
for (int j = 0; j < verticalPageCount; j++)
{
byte[] pageImageBytes = ganttChartExporter.GetPageImageBytes(i, j, pageWidth, pageHeight);
// Use page image bytes as needed.
}
}