客户端图像处理 [英] Client-side image processing

查看:228
本文介绍了客户端图像处理的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在构建一个基于网络的应用程序,需要大量的图像处理。我们希望这个处理负载尽可能地在客户端上,我们希望尽可能多的支持平台(甚至手机)。



是的,我知道,

p>


  1. 图像处理是从一些数据中光栅化的。想像从PDF文件创建一个PNG图像。

  2. 我们没有太多的服务器功能。因此,客户端处理是必须的。 所以,我们正在考虑:

    闪存 - 最广泛的,但从我读的是乏善可陈的开发工具。 (现在还没有iPhone / iPad的支持)。 Silverlight - 允许我们使用.NET CLR,所以一个很大的++(很多代码都在.NET中)。但是大多数手机都不支持(未来传言android支持)。HTML5 + Javascript - 可能是最便携的选择。问题是不得不重写Javascript中的所有图像处理代码。

任何想法或架构可能有帮助吗?
澄清:对于Silverlight和Javascript可用的库,我不需要进一步的想法。我的困境是选择Silverlight意味着不支持大多数手机

$ ul

  • 选择Flash意味着我们必须重新开发我们的大部分代码并且不支持iPhone / iPad
  • HTML5 + Javascript我们必须重新开发大部分代码,并且在所有浏览器中都不支持
  • 选择两个(Silverlight + Flash)将会太昂贵了



  • 任何现成或明智的想法/可能会丢失?

    解决方案

    这就是软件架构师一直遇到的问题。按照惯例,没有理想的解决方案。您需要选择哪种折衷方案最适合您的业务。为了总结一下你的问题,大部分的图像处理软件都是用.NET编写的。你想在移动设备上运行它的客户端,但在手机上的.NET渗透有限。具有较高渗透率(如Flash)的替代方案将要求您重新编写代码,这是您无法承担的。此外,iPhone / iPad不支持这些替代方案。



    理想情况下,您需要的是在大多数现有平台上运行所有.NET代码的方法,包括iPhone / iPad的。我可以放心地说,目前没有这样的解决办法 - 没有你忽视的银弹答案。

    那么你需要妥协什么?在我看来,即使你在闪存中重新开发,你仍然会错过一个主要的市场(iPhone)。无论如何,重新开发软件是非常昂贵的。

    这是解决您的问题的最佳解决方案 - 您需要在客户端执行约束上妥协。如果你执行服务器端,你可以保留现有的代码,也可以部署到几乎所有的移动客户端,包括iPhone。你说你的服务器能力是有限的,但是与软件开发成本相比,服务器处理能力是便宜的。事实上,外包你的服务器组件并不是那么昂贵,只需要支付你使用的东西。最有可能的是,你的应用程序将只有低渗透率开始。随着业务的增长,您将能够负担得起升级您的服务器容量。



    我相信这是解决您的问题的最佳方案。 b

    We're building a web-based application that requires heavy image processing. We'd like this processing load to be on the client as much as possible and we'd like to support as much platforms (even mobiles) as much as possible.

    Yeah, I know, wishful thinking

    Here's the info:

    1. Image processing is rasterization from some data. Think like creating a PNG image from a PDF file.

    2. We don't have a lot of server power. So client-side processing is a bit of a must.

    So, we're considering:

    1. Flash - most widespread, but from what i read has lackluster development tools. (and no iPhone/iPad support for now).

    2. Silverlight - allows us to use .NET CLR, so a big ++ (a lot of code is in .NET). But is not supported for most mobiles ( rumored android support in the future)

    3. HTML5 + Javascript - probably the most "portable" option. The problem is having to rewrite all that image processing code in Javascript.

    Any thoughts or architectures that might help? Clarification: I don't need further ideas on what libraries are available for Silverlight and Javascript. My dilemma is

    • choosing Silverlight means no support for most mobiles
    • choosing Flash means we have to redevelop most of our code AND no iPhone/iPad support
    • HTML5 + Javascript we have to redevelop most of our code and not fully supported yet in all browsers
    • choosing two (Silverlight + Flash) will be too costly

    Any out-of-the-box or bright ideas / alternatives I might be missing?

    解决方案

    This is the sort of issue that software architects run up against all the time. As per usual, there is no ideal solution. You need to select which compromise is most acceptable to your business.

    To summarise your problem, most of your image processing software is written in .NET. You'd like to run it client-side on mobile devices, but there is limited .NET penetration on mobiles. The alternatives with higher penetration (eg. Flash) would require you to re-write your code, which you can't afford to do. In addition, these alternatives are not supported on the iPhone/iPad.

    What you ideally want is a way to run all your .NET code on most existing platforms, including iPhone/iPad. I can say with some confidence that no such solution currently exists - there is no "silver bullet" answer that you have overlooked.

    So what will you need to compromise on? It seems to me that even if you redevelop in flash, you are still going to miss out on a major market (iPhone). And redeveloping software is extremely costly anyway.

    Here is the best solution to your problem - you need to compromise on your "client side execution" constraint. If you execute server side, you get to keep your existing code, and also get to deploy to just about every mobile client, including the iPhone.

    You said your server power is limited, but server processing power is cheap when compared to software development costs. Indeed, it is not all that expensive to outsource your server component and just pay for what you use. It's most likely that your application will only have low penetration to start off with. As the business grows, you will be able to afford to upgrade your server capacity.

    I believe this is the best solution to your problem.

    这篇关于客户端图像处理的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆