private void cmdSave_Click(object sender, System.EventArgs e) { try { Accusoft.ImagXpressSdk.SaveOptions so; if (imageXView1.Image.Tags != null) { imageXView1.Image.Tags.Dispose(); imageXView1.Image.Tags = null; } imageXView1.Image.Tags = colTags; so = new Accusoft.ImagXpressSdk.SaveOptions(); so.Format = ImageXFormat.Tiff; so.Tiff.Compression = Compression.NoCompression; imageXView1.Image.Save(txtSaveFile.Text, so); Application.DoEvents(); LoadAndGetTags(txtSaveFile.Text); } catch (Accusoft.ImagXpressSdk.ImagXpressException ex) { AccusoftError(ex, lblerror); } }
private static bool IsMultiPageEnabledForSaveOptions(Accusoft.ImagXpressSdk.SaveOptions so) { if (so.Format == ImageXFormat.Dcx && so.Dcx.MultiPage) { return(true); } else if (so.Format == ImageXFormat.Tiff && so.Tiff.MultiPage) { return(true); } else if (so.Format == ImageXFormat.Ico && so.Icon.MultiPage) { return(true); } return(false); }
public UnlockIXandProcessImg() { try { imagXpress1 = new Accusoft.ImagXpressSdk.ImagXpress(); //***The SetSolutionName, SetSolutionKey and possibly the SetOEMLicenseKey methods must be called to distribute the runtime*** //imagXpress1.Licensing.SetSolutionName("YourSolutionName"); //imagXpress1.Licensing.SetSolutionKey(12345,12345,12345,12345); //imagXpress1.Licensing.SetOEMLicenseKey("1.0.AStringForOEMLicensingContactAccusoftSalesForMoreInformation�"); //System.Console.WriteLine("ImagXpress successfully licensed."); imagProcessor = new Accusoft.ImagXpressSdk.Processor(imagXpress1); soSaveOptions = new Accusoft.ImagXpressSdk.SaveOptions(); soSaveOptions.Format = ImageXFormat.Tiff; soSaveOptions.Tiff.Compression = Compression.Group4; sInputFileName = System.IO.Path.Combine(strCurrentDir, @"..\..\..\..\..\..\..\..\..\..\Common\Images\Benefits.tif"); sOutputFileName = (strCurrentDir + "\\BenefitsRotated.tif"); imagX1 = Accusoft.ImagXpressSdk.ImageX.FromFile(imagXpress1, sInputFileName); imagProcessor.Image = imagX1; imagProcessor.Rotate(180); imagX1 = imagProcessor.Image; imagX1.Save(sOutputFileName, soSaveOptions); Dispose(); System.Console.WriteLine(("Rotated TIFF saved to file " + sOutputFileName)); System.Console.ReadLine(); } catch (Accusoft.ImagXpressSdk.ImagXpressException ex) { Dispose(); System.Console.WriteLine(ex.Message); System.Console.WriteLine(ex.Source); System.Console.ReadLine(); } catch (System.Exception ex) { Dispose(); System.Console.WriteLine(ex.Message); System.Console.WriteLine(ex.Source); System.Console.ReadLine(); } }