如何使用WebAPI处理图像 [英] How to handle Images using WebAPI

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

问题描述

问题


  1. 将图像POST / GET到我的服务的不同方法有哪些?我想我可以在JSON中使用Base-64文本,也可以将本机保留为二进制文件。我的理解是,通过将图像转换为文本,包装尺寸显着增加。

  1. What are the different ways to POST/GET images to my service? I think I can either use Base-64 text in JSON or stay native as binary. My understanding is that by converting the image into text, there is a significant increase is package size.

如果我发送图像(来自网络表单,来自我应该添加图像控制器/处理程序或使用格式化程序?这甚至是一个/或者问题?

If I send the image (from a web form, from a native client, from another service), should I add a Image Controller/Handler or use a Formatter? Is this even an either/or question?

我研究过并发现了很多竞争的例子,但我不确定哪个方向我应该前进。

I have researched and found many competing examples but I am not sure which direction I should be heading.

是否有网站/博客文章列出了这方面的利弊?

Is there a site/blog article that lays out the pros and cons for this?

推荐答案

我做了一些研究,你可以看到我在这里提出的实现:http://jamessdixon.wordpress.com/2013/10/01/handling-images-in-webapi/

I did some research and you can see the implementation I came up with here: http://jamessdixon.wordpress.com/2013/10/01/handling-images-in-webapi/

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

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