编辑JPEG图像 [英] Editing JPEG Images
本文介绍了编辑JPEG图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好.
我正在使用位图类来处理更改其像素值的图像.
但是问题是图像的大小.
是否有任何方法可以减小位图图像的大小而不更改其像素值.
JPEG图像的尺寸较小.是否提供任何可编辑JPEG像素值的类???
预先感谢..:-O
Hi Everyone .
I am using the bitmap class for manipulating images changing their pixel values.
But the problem is SIZE of the image.
Is there any method to reduce the size of a bitmap image without changing their pixel values.
JPEG Images has got less size .Is there any class provided to edit the JPEG pixel values ???
Thanx in advance.. :-O
推荐答案
JPEG文件较小,因为图像已压缩,因此...像素值已更改.如果您将一个直线位图转换为JPEG(另存为JPEG),则会更改像素值.
有两种方法可以减小位图文件的大小:调整图像大小或压缩图像.
当您使用.NET中的Graphics/Bitmap/Image类将JPEG加载到内存中时,您可以对JPEG进行所有操作,就像对位图图像进行处理一样.将JPEG加载到内存后,.NET框架将对图像进行解压缩,然后您就可以访问这些位.
参见此处: http://www.codeproject.com/KB/GDI-plus/GDI_.aspx [ ^ ]
或在这里:鲍勃·鲍威尔 [ ^ ]
干杯.
JPEG files are smaller because the image is compressed, so...the pixel values are changed. If you take a straight-up bitmap and convert it to (save it as) a JPEG, you are changing the pixel values.
There are two ways to make a bitmap file size smaller: resize the image or compress it.
When you load a JPEG into memory with the Graphics/Bitmap/Image classes in .NET you can do everything to that JPEG that you can to a bitmap image. Once you load the JPEG into memory, the .NET framework decompresses the image and you have access to the bits.
See here: http://www.codeproject.com/KB/GDI-plus/GDI_.aspx[^]
Or here: Bob Powell[^]
Cheers.
.NET Framework中没有内置方法可以按照您想要的方式进行.一切都作为完整的32位BMP(您可能会说BMP)未压缩的图像在内存中处理.
您将需要某种第三方库来以所需方式处理JPG编辑.我什么都不知道.
There is no built-in method to do this in the .NET Framework the way you want. Everything is handled as a full, 32-bit BMP (you might say BMP) uncompressed image in memory.
You''ll need some kind of 3rd party library that handles JPG editing the way you want. I don''t know of any off the top of my head.
这篇关于编辑JPEG图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文