4 Replies Latest reply on May 30, 2011 5:06 PM by minimum99

    JPEG Resolution Option prb

    DeepAlone Level 1



      While exporting the document as jpeg , if I set the  resolution more than 72, some portion of jpeg from bottom become black.

      and some times  its shows no preview available. I don't know what is being wrong but I want get jpeg in high resolution.


      plz help.

      here is the code ..






      AIRasterizeSettings rastSettings;

      rastSettings.type                 = kRasterizeRGB;

      rastSettings.antialiasing       = 2;

      rastSettings.options            = kRasterizeOptionsNone;

      rastSettings.resolution         = 150  //here I  set the resolution of raster


      AIImageOptJPEGParams params;

      params.blurAmount     = 0;

      params.kind                 = AIImageOptJPEGStandard;

      params.outAlpha         = FALSE;

      params.quality             = 90;

      params.scans             = 1;

      params.resolution        = 150;           //here I  set the resolution of jpeg



      //Get the first art of layer

      AILayerHandle layer = NULL;


      error = sAILayer->GetFirstLayer(&layer);

      error = sAIArt->GetFirstArtOfLayer(layer, &firstArt);



      //Rasterize and export JPEG


      error = sAIRasterize->RasterizeDocument (&rastSettings, kPlaceDefault, firstArt, &raster, 0, 0);


      error = sAIDataFilter->NewFileDataFilter(jpegFilePath, "write", 'ATR5', 'JPEG', &jpegDataFilter);

      error = sAIDataFilter->LinkDataFilter(NULL, jpegDataFilter);

      error = sAIImage->AsJPEG(raster, jpegDataFilter, params);


      error = sAIDataFilter->UnlinkDataFilter(jpegDataFilter, NULL);

      error = sAIArt->DisposeArt(raster);