The ASP page gets data uses that to draw a graph, I then need to save the image created to JPEG to be displayed on the browser and also used in PDF and other format. What is the best way to compress the image? I am currently porting a JPEG compression library to ASP but I think it will be too slow on this ARM device running Windows CE 6.0.
ASP页面获取数据用于绘制图形,然后我需要将创建的图像保存为JPEG以在浏览器上显示,并且还以PDF和其他格式使用。压缩图像的最佳方法是什么?我目前正在将一个JPEG压缩库移植到ASP,但我认为在运行Windows CE 6.0的ARM设备上它会太慢。
So, the ASP page, running in Windows CE webservers, gets data, renders it into a bitmap image than then needs to be delivered to the browser accessing that ASP page. The same image is also used in PDF and one other proprietary format that can contain JPEG streams.
因此,在Windows CE Web服务器中运行的ASP页面获取数据,将其呈现为位图图像,然后需要将其传递到访问该ASP页面的浏览器。同样的图像也用于PDF和另一种可包含JPEG流的专有格式。
Edit: What I am looking for is to way to create an array representing a bitmap and then compressing it to JPEG with ASP in Windows CE's IIS which has quite limited ASP implementation.
编辑:我正在寻找的是创建一个表示位图的数组,然后在Windows CE的IIS中使用ASP将其压缩为JPEG,而ASP的实现非常有限。
2 个解决方案
#1
3
Take a look at the Imaging APIs (start your traversal at the IImagingFactory interface). If your device has a JPG compression codec installed (remember that CE is modular, so it may or may not be present) you can use it to create a stream (or file) from the image. From there you can do with it what you wish.
看一下Imaging API(在IImagingFactory界面上开始遍历)。如果您的设备安装了JPG压缩编解码器(请记住CE是模块化的,因此它可能存在,也可能不存在),您可以使用它从映像创建流(或文件)。从那里你可以随心所欲地做到。
#2
0
I'm confused...
The images from ASP would be compressed on the server side--not client side.
来自ASP的图像将在服务器端压缩 - 而不是客户端。
I'm sure your web server is not running on Windows CE, so I don't think your concern is warranted.
我确定您的Web服务器没有在Windows CE上运行,所以我认为您的担忧是不合理的。
EDIT: Seems as though you can run a web server on Windows CE: http://www.microsoft.com/windows/embedded/products/windowsce/default.mspx. I'll keep my thoughts to myself from now on. :-x
编辑:好像你可以在Windows CE上运行Web服务器:http://www.microsoft.com/windows/embedded/products/windowsce/default.mspx。从现在开始,我会把自己的想法留给自己。 :-X
#1
3
Take a look at the Imaging APIs (start your traversal at the IImagingFactory interface). If your device has a JPG compression codec installed (remember that CE is modular, so it may or may not be present) you can use it to create a stream (or file) from the image. From there you can do with it what you wish.
看一下Imaging API(在IImagingFactory界面上开始遍历)。如果您的设备安装了JPG压缩编解码器(请记住CE是模块化的,因此它可能存在,也可能不存在),您可以使用它从映像创建流(或文件)。从那里你可以随心所欲地做到。
#2
0
I'm confused...
The images from ASP would be compressed on the server side--not client side.
来自ASP的图像将在服务器端压缩 - 而不是客户端。
I'm sure your web server is not running on Windows CE, so I don't think your concern is warranted.
我确定您的Web服务器没有在Windows CE上运行,所以我认为您的担忧是不合理的。
EDIT: Seems as though you can run a web server on Windows CE: http://www.microsoft.com/windows/embedded/products/windowsce/default.mspx. I'll keep my thoughts to myself from now on. :-x
编辑:好像你可以在Windows CE上运行Web服务器:http://www.microsoft.com/windows/embedded/products/windowsce/default.mspx。从现在开始,我会把自己的想法留给自己。 :-X