放大或缩小时如何在asp.net中保持.jpg或.gif图像的清晰度? [英] How to maintain .jpg or .gif image clarity in asp.net when zoom in or zoom out?

查看:188
本文介绍了放大或缩小时如何在asp.net中保持.jpg或.gif图像的清晰度?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在asp.net网站上,我正在裁剪图像,然后缩放(放大)裁剪的图像,但是缩放"图像的清晰度很差.

在此先感谢您.

In an asp.net website, I am cropping an image and then zoom(magnify) that cropped image But clarity of Zoom image is very poor.

Thanks in advance.

推荐答案

您只能对JPEG做两件事:

1)提高发布的JPEG图像的质量.降低压缩率,请尝试其他选择.重要注意事项:请勿将任何图像压缩两次或编辑JPEG.如果这样做,缺陷往往会累积.您需要将原始图像保持为无损格式,并且仅以该格式编辑图像,获取结果并压缩一次.无论您做什么,更高的质量都将需要更多的磁盘空间.有许多数字处理方法可让您使用不太大的文件大小来提高质量,例如,基于分形压缩(在这种情况下,您不直接使用它,它只能帮助您从不必要的细节中提取"图像)保持清晰). 使用这种方法是真实的艺术,无论一个人学会了多少时间,并不是每个人都能掌握.

2)请确保您绝不要尝试将图像缩放到超过实际像素" .最大缩放比例应为像素到像素(原始图像到屏幕).您可以略微违反此规则,因为它看起来很难看.

—SA
You can only do two things about JPEG:

1) Improve quality of published JPEG image. Reduce compression, try other options. One important note: you should never compress any image twice or edit JPEG. If you do it, defects tend to accumulate. You need to keep your original image in lostless format and only edit image in this format, get the result and compress once. Whatever you do, better quality will require more disk space. There are many digital processing methods which allow you to improve quality using not very big file size, for example, based of fractal compression (you do not use it directly in this case, it only helps you to "abstract" the image from unwanted detail keeping it pretty sharp). Using such methods is real art which not everyone is able to master, no matter how much time one learns it.

2) Make sure you never try to zoom your image more than to "actual pixel". Maximum zoom should be pixel-to-pixel (original image to screen). You can violate this rule slightly, as it makes it look ugly.

—SA


放大不会产生比原始图像更差的图像-它无法发明"数据,而.JPG则是有损的" 压缩会使情况变得更糟.
解决方案:不要放大jpeg文件!
Zooming in is aways going to produce poorer images than the original - it can''t "invent" data, and .JPG is a "lossy" compression which makes it worse.
Solution: don''t zoom in on jpeg files!


这篇关于放大或缩小时如何在asp.net中保持.jpg或.gif图像的清晰度?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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