Home > Software engineering >  Ask a very professional questions about JPG and PNG compression ratio.
Ask a very professional questions about JPG and PNG compression ratio.

Time:11-02

Is there a way to achieve high compression ratio of lossy compressed PNG?

JPG compression rate is so high, because is a combination of "damage + good compression algorithm,"


So, PNG can also achieve a similar effect? I'll take a picture and do "hurt" operation, and then saved as a PNG images?

Can achieve similar JPG compression rate is so high?



















CodePudding user response:

There's an old post discussed this problem,

CodePudding user response:

Search "Image Optimizer." "

CodePudding user response:

Can achieve in code layer? Introduce you to one, is a tool?

To achieve the effect of is:
Image "within a certain degree of damage can be accepted, but want to implement" compression rate as JPG "PNG storage,


refer to the second floor zhao4zhong1 response:
search "Image Optimizer"

CodePudding user response:

https://www.baidu.com/s? ie=utf-8& F=8 & amp; Rsv_bp=1 & amp; Rsv_idx=1 & amp; Tn=baidu& Wd=%22Image%20Optimizer%22%20site%3Abbs.csdn.net & amp; Oq=imageoptim % 20 MAC & amp; Rsv_pq=e3a0ef2e014dd2fe & amp; Rsv_t=7 e06twjnjz6bnyqy0c85ddru9mfpd7yfler3fsokecfwgetwlvhdued % 2 bgco & amp; Rsv_enter=0 & amp; InputT=22965 & amp; Sug=imageoptim % 20 MAC & amp; Rsv_sug3=43 & amp; Rsv_sug1=19 & amp; Rsv_sug7=100 & amp; Rsv_sug2=0 & amp; Rsv_sug4=23675

CodePudding user response:

CodePudding user response:

CodePudding user response:

JPG lossy based are Fourier algorithm, this is not the same as PNG compression algorithm is a bit
PNG can reduce image, pay attention to adjust the interpolation method to see what accord with the requirement of you
Can also be used to reduce the number of colors, such as 256, 168 colors, I made the test (PhotoShop to change color, some simple image color loss few)
A desktop picture
PNG 428 k
Quality JPG 20 110 k
JPG 80 quality 211 k
PNG 256 color 196 k
PNG 168 color 138 k

CodePudding user response:

CodePudding user response:

PNG is such as stroke code + LZW dictionary encoding
JPG is discrete cosine transform quantitative + + Huffman coding
JPEG2000 is said to be changed to wavelet transform quantitative + + upon arithmetic coding

PNG coding monochrome, or there is a lot of color piece of picture, efficiency is very high, completely without loss
JPG pictures for complex content, such as image compression, loss of high frequency information (i.e. image sharpness, contrast, texture detail)

PNG can use to color palette has shrunk, can to a certain extent, reduce the image size.
But because of the different principle of PNG and by using the method of discarding information to reduce the image size JPG no comparability.
The key is to use the right place.
  • Related