如何在c#中缩放图像 [英] how to zoom image in c#

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

问题描述



当用户将鼠标移到

Hi,
I want to zoom image when user do mouse over

推荐答案

时,我想缩放图像我认为这是一个位图图像。实际上,这样的图像不可缩放。是的,您可以看到它们随处放大,但这是通过重采样完成的缩放。基本上,你需要有一个大尺寸的源图像,尽可能大,并重新采样到较小的尺寸,因为尝试重新取样会产生难看的结果。



它已经在.NET中很好地实现了。使用ASP.NET,您可以使用 System.Drawing 。请查看我过去的答案:

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

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

在C#.net鼠标滚轮中缩放图像 [ ^ ]。



-SA
I assume this is a bitmap image. Actually, such images are not zoomable. Yes, you see zooming of them everywhere, but this is a zoom done via resampling. Basically, you need to have a source image of big size, as big as possible, and resample it to smaller sizes, because trying to resample it up give ugly results.

It is all already well implemented in .NET. With ASP.NET, you can use System.Drawing. Please see 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.[^],
Zoom image in C# .net mouse wheel[^].

—SA


这篇关于如何在c#中缩放图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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