如何以 4 bpp 或更低的压缩率压缩 jpeg 图像?

发布于 2024-12-29 09:15:03 字数 210 浏览 0 评论 0原文

我正在尝试在 Photoshop 中压缩我的 .jpeg 图像。 最好的方法是什么?

我现在正在计算 bpp,以 kb 为单位获取图像大小,计算有多少位。然后,我采用像素*像素为单位的图像大小来获取图像中的像素数量。之后,我划分位/像素,以找出图像每个像素有多少位。

但是我怎样才能改变这个号码呢?我的猜测是改变图像的大小,但我该怎么做呢?

感谢您的帮助!

I am trying to compress my .jpeg image in Photoshop.
WHat is the best way to do this?

I am now calculating the bpp taking the image size in kb, calculating how many bits that is. Then I take the image size in pixel*pixel to get the amount of pixels in the image. After that I divide bits/pixels, to find how many bits per pixel the image has.

But How can I change this number? My guess is to change how many kb the image is, but how do i do this?

Thanks for any help!!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

七婞 2025-01-05 09:15:03

是的,您可以获得比每像素 4 位更高的压缩率。纯色图像的速率可低至 0.13bpp。

事实上,4bpp 的压缩效果相当差——它与未压缩的 16 色图像或 256 色图像的一半相同,甚至 GIF 也能处理。 JPEG 在 1-2bpp 下看起来还不错。

Yes, you can achieve higher compression ratio than 4 bits per pixel. Images with solid color can have rate as low as 0.13bpp.

In fact 4bpp is quite poor compression — it's same as uncompressed 16-color image or half of 256-color image, which even GIF can manage. JPEG can look decent at 1-2bpp.

只怪假的太真实 2025-01-05 09:15:03

一般来说,您不能“压缩”jpeg 图像。您所能做的就是进一步降低图像质量以获得更低的 bpp 值。 jpeg 流始终被压缩,并且使用有损压缩方法。这意味着永远不会从 jpeg 图像重建原始图像。文件越小,丢失的信息就越多。

特定的“bpp 值”不是也不应该成为您的目标。尤其是有损压缩。你应该经常审视你当前的形象并决定它是否仍然足够好。

如果您仍然拥有原始图像,请尝试无损压缩格式,例如 zip 压缩或 lzw 压缩 tiff 或压缩 png。我确信 PhotoShop 也可以处理这些格式。其他软件,如 IrfanView (https://www.irfanview.com/) 或 XnView MP (https://www.xnview.com/en/xnviewmp/)也会转换您的图像。

如果您想手动(例如完全)控制图像,您应该使用命令行实用程序,例如 ImageMagick (https://imagemagick .org/)或 NConvert(请找到上面的 XnView MP 链接),

如果您只有 jpeg 图像 触摸 (编辑并保存) 他们。每次保存操作都会丢失另一堆信息。您应该始终处理文件副本。

您应该始终保留主图像(您用手机或相机拍摄的照片)。

当然,这些经验法则不会回答您最初的问题。

in general, you cannot "compress" a jpeg image. all you can do is to reduce the image quality further in order to achieve a lower bpp value. jpeg streams are always compressed and they use a lossy compression method. it means that the original image will never ever be reconstructed from a jpeg image. the smaller the file the more information you have lost.

a specific "bpp value" is not, and should never be your target. especially with lossy compression. you should always look at your current image and decide whether it is still good enough or not.

if you still have the original image, try a lossless compression format, like zip-compressed or lzw-compressed tiff or compressed png. i'm sure PhotoShop can handle these formats as well. another softwares like IrfanView (https://www.irfanview.com/) or XnView MP (https://www.xnview.com/en/xnviewmp/) will convert your images too.

if you want manual (eg. full) control over your images, you should use command line utilities, like ImageMagick (https://imagemagick.org/) or NConvert (please find the XnView MP link above)

if you have only the jpeg images do not touch (edit & save) them. with every single save operation you lose another bunch of information. you should always work on file copies.

you should always keep your master image (the very picture you took with your phone or your camera).

of course, these rules of thumb will not answer your original question.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文