尝试减小图像尺寸时,图像尺寸变大 [英] Image size gets bigger when trying to reduce its size
问题描述
可能重复:
尝试缩小图像尺寸时,图像尺寸变大了
无论我使用哪种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屋!