|
I am coverting tiff to jpeg as below and trying to load codecs.load method.
FileStream fsInput = null; System.Drawing.Image img = null; MemoryStream outputStream = null; FrameDimension imageDimention = null;
try { fsInput = new FileStream(filepath, FileMode.Open, FileAccess.Read); img = System.Drawing.Image.FromStream(fsInput);
outputStream = new MemoryStream(); img.Save(outputStream,ImageFormat.Jpeg);
RasterCodecs.Startup(); RasterImageFormat imgFormat = GetRasFormatType(inputFile);
codecs = new RasterCodecs();
RasterSupport.Unlock(RasterSupportType.PdfSave, pdfSaveKey); //unlock PDF_SAVE
img = codecs.Load(outputStream); //load input file
|