c#
VB
objective - c
c++
Java
公共结构体GlobalMemoryThresholds
公共结构GlobalMemoryThresholds
@接口GlobalMemoryThresholds: NSObject
公共类GlobalMemoryThresholds
公共:结构体GlobalMemoryThresholds
使用RasterDefaults。GetGlobalMemoryThresholds而且RasterDefaults。SetGlobalMemoryThresholds获取或设置分配new时使用的常规内存限制RasterImage对象。
GlobalMemoryThresholds包含以下成员:
| 成员 | 描述 |
|---|---|
| MaximumConventionalMemory | 对象时使用的连续常规内存的最大大小(以字节为单位)RasterImage对象。 |
使用Leadtools;使用Leadtools.Codecs;公共静态无效MaximumConventionalMemoryTest (){控制台。WriteLine (“maximumConventionalMemoryTest”);字符串imageFileName =@“C: \ LEADTOOLS21 \资源\ \ Leadtools.pdf图像”;长Size = 0;使用(varrasterCodecs =新RasterCodecs ()){使用(varrasterImage = rasterCodecs。负载(imageFileName, 1)){控制台。WriteLine ("已加载,大小:{0}常规:{1}磁盘:{2}",rasterImage。DataSize,rasterImage。IsConventionalMemory rasterImage.IsDiskMemory);Debug.Assert (rasterImage.IsConventionalMemory);Debug.Assert (! rasterImage.IsDiskMemory);size = rasterImage.DataSize;}//设置最大常规大小为位图的一半,然后重新检查。应该是磁盘GlobalMemoryThresholds thresholds = RasterDefaults.GetGlobalMemoryThresholds();控制台。WriteLine (原始GlobalMemoryThresholds”。MaximumConventionalMemory = {0}", thresholds.MaximumConventionalMemory);阈值。MaximumConventionalMemory = size / 2;RasterDefaults.SetGlobalMemoryThresholds(阈值);thresholds = RasterDefaults.GetGlobalMemoryThresholds();控制台。WriteLine (“新GlobalMemoryThresholds。MaximumConventionalMemory ={0}", thresholds.MaximumConventionalMemory);使用(varrasterImage = rasterCodecs。负载(imageFileName, 1)){控制台。WriteLine ("已加载,大小:{0}常规:{1}磁盘:{2}",rasterImage。DataSize,rasterImage。IsConventionalMemory rasterImage.IsDiskMemory);Debug.Assert (! rasterImage.IsConventionalMemory);Debug.Assert (rasterImage.IsDiskMemory);}//现在设置为-1,并尝试创建一个20 × 20的32 bpp英寸位图,应该是磁盘/ /重置RasterDefaults.SetGlobalMemoryThresholds (GlobalMemoryThresholds.Default);thresholds = RasterDefaults.GetGlobalMemoryThresholds();控制台。WriteLine (原始GlobalMemoryThresholds”。MaximumConventionalMemory = {0}", thresholds.MaximumConventionalMemory);阈值。maximum常规内存= -1;RasterDefaults.SetGlobalMemoryThresholds(阈值);thresholds = RasterDefaults.GetGlobalMemoryThresholds();控制台。WriteLine (“新GlobalMemoryThresholds。MaximumConventionalMemory ={0}", thresholds.MaximumConventionalMemory);使用(varrasterImage =新RasterImage (RasterMemoryFlags。传统的,20 * 300,20 * 300,32岁的RasterByteOrder。Bgr,RasterViewPerspective。TopLeft,零,零,0)){控制台。WriteLine ("created, size:{0} Conventional:{1} Disk:{2}",rasterImage。DataSize,rasterImage。IsConventionalMemory rasterImage.IsDiskMemory);Debug.Assert (! rasterImage.IsConventionalMemory);Debug.Assert (rasterImage.IsDiskMemory);}//最终创建8.5乘11在300 DPI,应该是conv使用(varrasterImage =新RasterImage (RasterMemoryFlags。传统的,(int)(8.5 * 300),11 * 300,32岁的RasterByteOrder。Bgr,RasterViewPerspective。TopLeft,零,零,0)){控制台。WriteLine ("created, size:{0} Conventional:{1} Disk:{2}",rasterImage。DataSize,rasterImage。IsConventionalMemory rasterImage.IsDiskMemory);Debug.Assert (rasterImage.IsConventionalMemory);Debug.Assert (! rasterImage.IsDiskMemory);}}/ /重置RasterDefaults.SetGlobalMemoryThresholds (GlobalMemoryThresholds.Default);}
进口Leadtools进口Leadtools。编解码器进口Leadtools。ImageProcessing公共共享子MaximumConventionalMemoryTest ()控制台。WriteLine (“maximumConventionalMemoryTest”)昏暗的imageFileName作为字符串=“C: \ LEADTOOLS21 \资源\ \ Leadtools.pdf图像”昏暗的大小作为长= 0使用rasterCodecs作为新RasterCodecs ()使用rasterImage作为光栅图像=光栅编解码器。负载(imageFileName, 1)控制台。WriteLine ("已加载,大小:{0}常规:{1}磁盘:{2}",rasterImage。DataSize,rasterImage。IsConventionalMemory rasterImage.IsDiskMemory)Debug.Assert (rasterImage.IsConventionalMemory)调试。作为sert(不rasterImage.IsDiskMemory)size = rasterImage。DataSize结束使用'将最大常规尺寸设置为位图的一半,然后重新检查。应该是磁盘昏暗的阈值作为GlobalMemoryThresholds = RasterDefaults.GetGlobalMemoryThresholds()控制台。WriteLine (原始GlobalMemoryThresholds”。MaximumConventionalMemory = {0}"thresholds.MaximumConventionalMemory)阈值。MaximumConventionalMemory =CType(大小/ 2,长)RasterDefaults.SetGlobalMemoryThresholds(阈值)thresholds = RasterDefaults.GetGlobalMemoryThresholds()控制台。WriteLine (“新GlobalMemoryThresholds。MaximumConventionalMemory ={0}"thresholds.MaximumConventionalMemory)使用rasterImage作为光栅图像=光栅编解码器。负载(imageFileName, 1)控制台。WriteLine ("已加载,大小:{0}常规:{1}磁盘:{2}",rasterImage。DataSize,rasterImage。IsConventionalMemory rasterImage.IsDiskMemory)调试。作为sert(不rasterImage.IsConventionalMemory)Debug.Assert (rasterImage.IsDiskMemory)结束使用'现在设置为-1,并尝试创建一个20 × 20的32 bpp英寸位图,应该是磁盘“重置RasterDefaults.SetGlobalMemoryThresholds (GlobalMemoryThresholds。默认的)thresholds = RasterDefaults.GetGlobalMemoryThresholds()控制台。WriteLine (原始GlobalMemoryThresholds”。MaximumConventionalMemory = {0}"thresholds.MaximumConventionalMemory)阈值。MaximumConventionalMemory = -1RasterDefaults.SetGlobalMemoryThresholds(阈值)thresholds = RasterDefaults.GetGlobalMemoryThresholds()控制台。WriteLine (“新GlobalMemoryThresholds。MaximumConventionalMemory ={0}"thresholds.MaximumConventionalMemory)使用rasterImage作为新RasterImage (RasterMemoryFlags。传统的,20 * 300,20 * 300,32岁的RasterByteOrder。Bgr,RasterViewPerspective。TopLeft,没有什么,没有什么,0)控制台。WriteLine ("created, size:{0} Conventional:{1} Disk:{2}",rasterImage。DataSize,rasterImage。IsConventionalMemory rasterImage.IsDiskMemory)调试。作为sert(不rasterImage.IsConventionalMemory)Debug.Assert (rasterImage.IsDiskMemory)结束使用'最终创建8.5乘11在300 DPI,应该是conv使用rasterImage作为新RasterImage (RasterMemoryFlags。传统的,CInt(8.5 * 300),11 * 300,32岁的RasterByteOrder。Bgr,RasterViewPerspective。TopLeft,没有什么,没有什么,0)控制台。WriteLine ("created, size:{0} Conventional:{1} Disk:{2}",rasterImage。DataSize,rasterImage。IsConventionalMemory rasterImage.IsDiskMemory)Debug.Assert (rasterImage.IsConventionalMemory)调试。作为sert(不rasterImage.IsDiskMemory)结束使用结束使用“重置RasterDefaults.SetGlobalMemoryThresholds (GlobalMemoryThresholds。默认的)结束子
帮助收藏
光栅net|C API|c++类库|HTML5 JavaScript
文档net|C API|c++类库|HTML5 JavaScript
医疗net|C API|c++类库|HTML5 JavaScript
医疗网络查看器net
188宝金博怎么下载
支持的平台上
.NET、Java、Android和iOS/macOS程序集
C API/ c++类库
HTML5 JavaScript库
您的邮件已发送给技术支持!应该有人联系!如果你的事情很紧急,请回来聊天。
聊天时间:
周一至周五,美国东部时间上午8:30至下午6:00
感谢您的反馈!
请再次填写表格,开始新的聊天。
所有代理目前都离线。
聊天时间:
星期一至星期五
美国东部时间上午8:30 -下午6点
如需与我们联系,请填写此表格,我们将通过电子邮件与您联系。
