在VS2012中调整Web应用程序的大小并打印图像 [英] Resize and print image from web app in VS2012

查看:78
本文介绍了在VS2012中调整Web应用程序的大小并打印图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个我一直在玩的软件。我有一个与该软件相关的网络应用程序。软件发送到Web App。 Web应用程序表单发送回软件关闭。在Web应用程序中,有一个带有捕获图像的表单。然后可以从软件的结果侧查看表单和图像。我试图从缩略图弹出图像,以便我可以在更大的窗口中查看。此外,我正在尝试打印第1页上的表单和第2页上的图像。我正在尝试使图像成为整页大小而不是它显示的缩略图。任何帮助?

I have a software that I have been toying around with. I have a web app associated with that software. Software sends to Web App. Web app form send back to software to close out. In the web app there is a form with a capture image. The form and images are then viewable from the results side on the Software. I am trying to have the image popup from a thumbnail so i can be viewed in a larger window. Furthermore, I am trying to print both the form on pg 1 and the image on pg 2. I am looking at trying to make the image a full page size instead of the thumbnail it it showing. Any help?

推荐答案

图像不能简单地调整大小(那是什么?),然后可以重新采样,这可以以不同的质量完成并不是一个微不足道的转变,因为它们是像素图​​像。但是,这可以通过ASP.NET轻松完成(您使用的是什么?您的标记非常不合适;无论您是否使用它,它都与Visual Studio无关)。您可以使用 System.Drawing



这在我过去的答案中有解释:

调整vb.net中的图片大小 [ ^ ],

在流中读取Big Tiff和JPEG文件(>(23000 x 23000)pix)。并实时显示部分内容。 [ ^ ]。



有些查询者试图反对这只适用于 System.Windows.Forms 。不对。它可以在任何地方使用,包括ASP.NET。



至于打印,我会留给用户,这是最好的解决方案。浏览器的用户知道如何以及何时打印。但是,使用@media规则来关注打印介质CSS会很好: http://www.w3 .org / TR / CSS2 / media.html [ ^ ]。



-SA
Images cannot be simply "resized" (what is that?), then can be re-sampled, which can be done with different quality and is not a trivial transformation, because they are pixel images. However, this is easily done with ASP.NET (is that what you use? your tag is quite inadequate; it all is unrelated to Visual Studio, no matter if you use it or not). You can use System.Drawing.

This is explained in my past answers:
resize image in vb.net[^],
Read Big Tiff and JPEG files (>(23000 x 23000) pix) in a stream. And display part of it to the screen in realtime.[^].

Some inquirers tried to object that this is only applicable to System.Windows.Forms. Not true. It can be used anywhere, including ASP.NET.

As to printing, I would leave it to the user, which is really the best solution. The users of the browser know how and when to print. However, it would be good to take care about print media CSS, using @media rules: http://www.w3.org/TR/CSS2/media.html[^].

—SA


这篇关于在VS2012中调整Web应用程序的大小并打印图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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