提供3000多款全球软件/控件产品
针对软件研发的各个阶段提供专业培训与技术咨询
根据客户需求提供定制化的软件开发服务
全球知名设计软件,显著提升设计质量
打造以经营为中心,实现生产过程透明化管理
帮助企业合理产能分配,提高资源利用率
快速打造数字化生产线,实现全流程追溯
生产过程精准追溯,满足企业合规要求
以六西格玛为理论基础,实现产品质量全数字化管理
通过大屏电子看板,实现车间透明化管理
对设备进行全生命周期管理,提高设备综合利用率
实现设备数据的实时采集与监控
利用数字化技术提升油气勘探的效率和成功率
钻井计划优化、实时监控和风险评估
提供业务洞察与决策支持实现数据驱动决策
翻译|产品更新|编辑:李显亮|2019-07-23 11:10:16.170|阅读 192 次
概述:近期发布了Aspose.Imaging for .NET v19.6,JPEG输出中不再保留IMAGINGNET-3351 DPI属性,下面我们一起来探索新版中的新增功能及其工作原理。>>欢迎下载Aspose.Imaging for .NET v19.6体验
# 慧都年终大促·界面/图表报表/文档/IDE等千款热门软控件火热促销中 >>
Aspose.Imaging for .NET一种高级图像处理控件,允许开发人员创建,编辑,绘制或转换图像。图像导出和转换是API核心功能之一,它允许在不安装Photoshop应用程序或任何其他图像编辑器的情况下保存为AdobePhotoshop®本机格式。
近期发布了Aspose.Imaging for .NET v19.6,JPEG输出中不再保留IMAGINGNET-3351 DPI属性,下面我们一起来探索新版中的新增功能及其工作原理。>>欢迎下载Aspose.Imaging for .NET v19.6体验
string dir = "c:\\aspose.work\\IMAGINGNET\\3351\\"; using (Aspose.Imaging.FileFormats.Tiff.TiffImage tiffImage = (Aspose.Imaging.FileFormats.Tiff.TiffImage)Image.Load(dir + "source2.tif")) { int i = 0; foreach (Aspose.Imaging.FileFormats.Tiff.TiffFrame tiffFrame in tiffImage.Frames) { Aspose.Imaging.ImageOptions.JpegOptions saveOptions = new Aspose.Imaging.ImageOptions.JpegOptions(); saveOptions.ResolutionSettings = new ResolutionSetting(tiffFrame.HorizontalResolution, tiffFrame.VerticalResolution); if (tiffFrame.FrameOptions != null) { // Set the resolution unit explicitly. switch (tiffFrame.FrameOptions.ResolutionUnit) { case Aspose.Imaging.FileFormats.Tiff.Enums.TiffResolutionUnits.None: saveOptions.ResolutionUnit = ResolutionUnit.None; break; case Aspose.Imaging.FileFormats.Tiff.Enums.TiffResolutionUnits.Inch: saveOptions.ResolutionUnit = ResolutionUnit.Inch; break; case Aspose.Imaging.FileFormats.Tiff.Enums.TiffResolutionUnits.Centimeter: saveOptions.ResolutionUnit = ResolutionUnit.Cm; break; default: throw new System.NotSupportedException(); } } string fileName = "source2.tif.frame." + (i++) + "." + saveOptions.ResolutionUnit + ".jpg"; tiffFrame.Save(dir + fileName, saveOptions); } }
using (Image image = Image.Load("halfGigImage.png")) { // todo something }
string dir = "c:\\aspose.work\\IMAGINGNET\\3287\\"; string fileName = dir + "image2.wmf"; // Save WMF to SVG using (Aspose.Imaging.Image image = Aspose.Imaging.Image.Load(fileName)) { // The customer uses EmfRasterizationOptions instead of WmfRasterizationOptions. // EmfRasterizationOptions works correctly in .NET as well. Aspose.Imaging.ImageOptions.WmfRasterizationOptions rasterizationOptions = new Aspose.Imaging.ImageOptions.WmfRasterizationOptions(); rasterizationOptions.PageSize = image.Size; Aspose.Imaging.ImageOptions.SvgOptions saveOptions = new Aspose.Imaging.ImageOptions.SvgOptions(); saveOptions.VectorRasterizationOptions = rasterizationOptions; image.Save(fileName + ".svg", saveOptions); } // Save WMF to PNG using (Aspose.Imaging.Image image = Aspose.Imaging.Image.Load(fileName)) { // The customer uses EmfRasterizationOptions instead of WmfRasterizationOptions. // EmfRasterizationOptions works correctly in .NET as well. Aspose.Imaging.ImageOptions.WmfRasterizationOptions rasterizationOptions = new Aspose.Imaging.ImageOptions.WmfRasterizationOptions(); rasterizationOptions.PageSize = image.Size; Aspose.Imaging.ImageOptions.PngOptions saveOptions = new Aspose.Imaging.ImageOptions.PngOptions(); saveOptions.VectorRasterizationOptions = rasterizationOptions; image.Save(fileName + ".png", saveOptions); }
public void WmfToJpg() { using (Image image = Image.Load("portrt.wmf")) { image.Save( "portrt.jpg", new JpegOptions() { VectorRasterizationOptions = new WmfRasterizationOptions { BackgroundColor = Color.WhiteSmoke, PageWidth = image.Width, PageHeight = image.Height, } }); } } public void WmfToPngWithBorders() { using (Image image = Image.Load("portrt.wmf")) { image.Save( "portrt.png", new PngOptions() { VectorRasterizationOptions = new WmfRasterizationOptions { BackgroundColor = Color.WhiteSmoke, PageWidth = image.Width, PageHeight = image.Height, BorderX = 50, BorderY = 20 } }); } }
string fileName = "example.odg"; using (OdgImage image = (OdgImage)Image.Load(fileName)) { }
public void TestExportGifToPdf() { string[] fileNames = new [] { "czone.gif", "DTRA_LogoType.gif", "DTRA_Seal.gif", "Equip1.gif", "Equip2.gif", "Equip3.gif" }; foreach (string fileName in fileNames) { using (Image image = Image.Load(fileName)) { image.Save(fileName + ".pdf", new PdfOptions()); } } }
// RotateFlip operation doesn't work as expected with PSD string sourceFile = "1.psd"; string pngPath = "RotateFlipTest2617.png"; string psdPath = "RotateFlipTest2617.psd"; RotateFlipType flipType = RotateFlipType.Rotate270FlipXY; using (var im = (PsdImage)(Image.Load(sourceFile))) { im.RotateFlip(flipType); im.Save(pngPath, new PngOptions() { ColorType = PngColorType.TruecolorWithAlpha }); im.Save(psdPath); }
using (DjvuImage image = (DjvuImage)Imaging.Image.Load(@"input.djvu")) { PngOptions exportOptions = new PngOptions(); for (int i = 0; i < image.Pages.Length; i++) { DjvuPage page = image.Pages[i]; page.Save(@"page" + i + ".png", exportOptions); } }
using (Image image = Image.Load("test.svg")) { image.Save("test.svg_out.bmp", new BmpOptions() { VectorRasterizationOptions = new SvgRasterizationOptions() { PageWidth = 100, PageHeight = 200 } }); }
-- 未完待续 --
*想要购买Aspose.Imaging正版授权的朋友可咨询哦~
扫描关注慧聚IT微信公众号,及时获取最新动态及最新资讯
本站文章除注明转载外,均为本站原创或翻译。欢迎任何形式的转载,但请务必注明出处、不得修改原文相关链接,如果存在内容上的异议请邮件反馈至chenjj@pclwef.cn
文章转载自:知名C/C++开发工具CLion全新发布v2024.3,新版本新语言引擎有显著改进等,欢迎下载新版体验!
强大的VS插件CodeRush已正式发布v24.2.3,新版本现在可以运行xUnit.Net v3测试等,欢迎下载最新版体验!
Spire.PDF 10.12.4 最新版本支持在进行多页打印时设置自动旋转方向。同时,一些已知问题也在本次更新中被成功修复,例如打印 PDF 文档时内容丢失的问题,欢迎下载体验~
日程安排控件dhtmlxScheduler v7.2全新发布,新版本增强并增加了编辑、修改等多个操作体验,欢迎下载最新版试用~
服务电话
重庆/ 023-68661681
华东/ 13452821722
华南/ 18100878085
华北/ 17347785263
客户支持
技术支持咨询服务
服务热线:400-700-1020
邮箱:sales@pclwef.cn
关注我们
地址 : 重庆市九龙坡区火炬大道69号6幢