Copy link to clipboard
Hi, I am trying to rasterize an artboard but continue to get an error kBadParameterErr. The code I am using is this, I do not quite get what is the problem.
rastSettings.type = kRasterizeRGB;
rastSettings.antialiasing = 2;
rastSettings.options = kRasterizeOptionsNone;
rastSettings.ccoptions = AIColorConvertOptions::kForExport;
rastSettings.resolution = 72; //here I set the resolution of raster
//Get the first art of layer
AILayerHandle layer = NULL;
auto error = s_layer->GetFirstLayer(&layer);
error = s_art->GetFirstArtOfLayer(layer, &firstArt);
// Rasterize the document
error = s_raster->RasterizeDocument(&rastSettings, kPlaceDefault, firstArt, &raster, Progress, kRasterizeOptionsNone);
// == HERE error is always kBadParameter
I am trying to wrap my head around the illustrator SDK but I do not understand how to debug the issue. Is there some better error reporting that I can get somewhere?
Have something to add?