English 中文(简体)
WMF图像数据验证
原标题:WMF image data validation?

有一个图像采集装置,能够将其产出成群。 这一产出直接储存在数据库中。 我们有这样的情况,即有时其中一些图像没有出现在独立实体的网页上。 但是,如果我们右上点击一页,我们就能够把图像保存到硬盘上;意思是,这一形象确实存在,但似乎并不明显。 我认为,这是因为有一些腐败问题,但我不知道如何解决这一问题。 然而,我们却能够使用MS图像仪(台站式扫描仪)查看此类档案。 我们能够发现这种有问题的档案吗?

问题回答

我希望我不会过于简单,但以下职能对我来说是有用的:

    public bool IsValidMetaFile(string filePath)
    {
        try
        {
            var metaFile = new Metafile(filePath);

            var metaFileHeader = metaFile.GetMetafileHeader();

            return metaFileHeader.IsWmf() ||
                   metaFileHeader.IsWmfPlaceable() ||
                   metaFileHeader.IsEmf() ||
                   metaFileHeader.IsEmfPlusDual() ||
                   metaFileHeader.IsEmfPlusOnly() ||
                   metaFileHeader.IsEmfOrEmfPlus();
        }
        catch (Exception mesg)
        {
            return false;
        }

    }




相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Transaction handling with TransactionScope

I am implementing Transaction using TransactionScope with the help this MSDN article http://msdn.microsoft.com/en-us/library/system.transactions.transactionscope.aspx I just want to confirm that is ...

System.Web.Mvc.Controller Initialize

i have the following base controller... public class BaseController : Controller { protected override void Initialize(System.Web.Routing.RequestContext requestContext) { if (...

Microsoft.Contracts namespace

For what it is necessary Microsoft.Contracts namespace in asp.net? I mean, in what cases I could write using Microsoft.Contracts;?

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签