尝试减小图像尺寸时,图像尺寸变大 [英] Image size gets bigger when trying to reduce its size

查看:80
本文介绍了尝试减小图像尺寸时,图像尺寸变大的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可能重复:
尝试缩小图像尺寸时,图像尺寸变大了

无论我使用哪种InterpolationMode,我要调整大小的都是一个.jpg文件(5kb),结果是27kb.从其大小来看,原始文件之前可能已经被压缩.目的是为了降低分辨率,以便在将其添加到我的网站时使其更小.我正在使用本教程: 图像大小调整教程.

我设法调整了分辨率,包括裁切.我的问题是图片的实际尺寸变大了,而不是我期望的小.

请问有什么想法吗?

解决方案

尝试调整传递给saveJpeg方法的参数的质量,而不仅仅是调整InterpolationMode.

您当前使用的质量是什么?

Possible Duplicate:
Image size got bigger when trying to reduce its size

What I am trying to resize is a .jpg file (5kb) and the result is 27kb, no matter which InterpolationMode I use. judging from it's size The original file probably was already compressed before. The aim was to reduce it's resolution in order for it to be smaller when I add it to my site. I am using this tutorial: Image resizing tutorial.

I managed to resize the resolution including cropping. My problem is that actual size of the image got bigger instead of smaller as I expected.

Any ideas please?

解决方案

Try adjusting the quality for the parameter you are passing to the saveJpeg method instead of just the InterpolationMode.

What quality are you currently using?

这篇关于尝试减小图像尺寸时,图像尺寸变大的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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