Skip navigation
Currently Being Moderated

JPEG Resolution Option prb

May 26, 2011 5:00 AM

hi,

 

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 ..

 

 

////START

 

 

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);

 

 

////END

 
Replies

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points