我有一个大约 1200 x 400 的图像(如果我没记错的话),大小约为 50kb。我在网站的标题中使用图像,但我将图像的高度限制为 100 像素,以使其适合我的标题。
<asp:Image ID="imgLogo" runat="server" ImageUrl="~/Images/AFact.jpg" Height="100px" />
这是一种不好的做法吗?是不是说把图片完整下载到客户端,然后客户端的浏览器就得浪费cpu来调整大小?使用 Photoshop 将图像缩小到我想要的高度会更好吗?
最佳答案
Is this a bad practice? Does it mean that the image is being downloaded in full to the client, and then the client's browser has to waste cpu to resize it? Would I be better off to scale the image down to the height that I want it at by using Photoshop?
对你所有的问题都是肯定的。
关于asp.net - 调整图像大小和性能,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/890629/