Page 1 of 2 12 LastLast
Results 1 to 30 of 39

Thread: Lossless JPG Compression

  1. #1
    Member
    Join Date
    Aug 2008
    Location
    NZ
    Posts
    59
    Thanks
    30
    Thanked 11 Times in 7 Posts

    Question Lossless JPG Compression

    What is the best method to maximize compression of JPG's losslessy?

    I've done some tests on the enclosed JPG test file.

    Code:
    Original size		135,671	bytes
    Nanozip			135,433		-cO -m4g
    Precomp/Nanozip		110,250		-cn -intense + -cO -m4g
    Precomp/paq8px183fix1	110,148		-cn -intense + -9beta
    Precomp/fast paq8 v6	110,140		-cn -intense + -8
    Precomp			110,079		-cn -intense
    PackJPG	v2.5k		110,055
    fast paq8 v6		101,459		-8
    paq8px183fix1		101,192		-9beta

    Ideas please?
    Attached Files Attached Files

  2. #2
    Administrator Shelwien's Avatar
    Join Date
    May 2008
    Location
    Kharkov, Ukraine
    Posts
    3,977
    Thanks
    296
    Thanked 1,306 Times in 742 Posts
    1) Jpeg is an already compressed format. Its entropy coding is inefficient and metainfo is left uncompressed,
    but still, a general-purpose compression algorithm (eg. nanozip) can't achieve good results.

    2) There're specialized compressors for jpeg format (usually called recompressors):
    winzip,stuffit, brunsli,lepton,packjpg, jojpeg,rejpeg,pjpg

    3) On single file the best compression would be achieved by something using the recent paq8px jpeg model -
    maybe cmix or paq8pxd, depending on specific details.
    But on a large number of files the result surprisingly may be better using mfilter, because of its preprocessing of thumbnails and color profiles.
    So the best method might be to use mfilter with dummy lepton exe (without compression), then paq8px or cmix.

    Code:
    135,671 0067.jpg  // original 
    134,291 0067.cdm  // bwtsh|cdm5
    117,573 0067.pjpg // pjpg c 0067.jpg 0067.pjpg
    114,725 0067.rjg  // rejpeg 0067.jpg 
    114,499 0067.zip  // WZZIP -ez 0067.zip 0067.jpg
    113,576 0067.brn  // brunsli c 0067.jpg 0067.brn
    110,079 0067.pcf  // precomp 4.7 -cn (uses packjpg library)
    110,126 0067.lep1 // lepton 0067.jpg     
    110,055 0067.pjg  // packJPG 0067.jpg
    109,838 0067.lep2 // lepton-slow 0067.jpg (based on packjpg)
    109,982 0067.7z   // 7z a -m0=mfilter:a1 0067.7z 0067.jpg (uses lepton)
    107,106 0067.pa   // 7z a -m0=jojpeg -m1=plzma 0067.pa 0067.jpg (uses jojpeg_sh4)
    106,677 0067.jo3a // jojpeg_sh3 c 0067.jpg 0067.jo3a 0067.jo3b (separate stream for metainfo)
        409 0067.jo3b
    103,974 0067.jo2  // jojpeg_sh2 c 0067.jpg 0067.jo2 (standalone paq8p model)
    103,660 0067.sitx // stuffit\pack /c -a=0067.sitx -l=16 -x=30 -b -o --jpeg-no-thumbnails --level=999 --recompression=all --recompression-level=2 0067.jpg

  3. Thanks (2):

    brispuss (17th November 2019),Bulat Ziganshin (1st December 2019)

  4. #3
    Member
    Join Date
    Aug 2008
    Location
    NZ
    Posts
    59
    Thanks
    30
    Thanked 11 Times in 7 Posts
    Quote Originally Posted by Shelwien View Post
    So the best method might be to use mfilter with dummy lepton exe (without compression), then paq8px or cmix.
    OK. So how exactly do you use mfilter (which I've downloaded and installed under 7-zip directory) with a "dummy" lepton (for no compression)?

    I can't use cmix because I only have 8GB of RAM; I believe for Windows 32GB of RAM is required(?) Anyway cmix always crashes on compression tests, probably due to lack of RAM.

  5. #4
    Administrator Shelwien's Avatar
    Join Date
    May 2008
    Location
    Kharkov, Ukraine
    Posts
    3,977
    Thanks
    296
    Thanked 1,306 Times in 742 Posts
    Have to put mfilter7z*.dll to "7-Zip\Codecs" rather than "7-Zip".
    Then it should work with syntax like above (7z a -m0=mfilter:a1 0067.7z 0067.jpg)

    ...Actually there's this: http://nishi.dreamhosters.com/u/mfil...o_20191013.rar

  6. #5
    Member
    Join Date
    Aug 2008
    Location
    NZ
    Posts
    59
    Thanks
    30
    Thanked 11 Times in 7 Posts
    Yes, thanks. I had already placed the mfilter files within a newly created Codecs sub-folder previously, as per the instructions that came with the files.

    The command 7z a -m0=mfilter:a1 0067.7z 0067.jpg creates an uncompressed 7-zip file via the lepton codec which then can be further processed/compressed using paq8.. and other compressors?

    EDIT: Assuming the above, the 0067.7z file was compressed using the following with the following results -

    Code:
    135,671 bytes - original file 0067.jpg
    109,982 bytes - mfiltered 7z file created using above command
    109,977 bytes - mfiltered 7z file compressed with paq8pxd v69 -s9
    109,927 bytes - mfiltered 7z file compressed with fast paq8 v6 -8
    109,908 bytes - mfiltered 7z file compressed with paq8px V183fix1 -9beta
    Not really good results!?

    Best result so far is using paq8px v183fix1 directly on the 0067.jpg file, with 101,192 bytes file resulting.

    It seems the mfilter method is not the best to use here(?)
    Last edited by brispuss; 1st December 2019 at 13:25.

  7. #6
    Administrator Shelwien's Avatar
    Join Date
    May 2008
    Location
    Kharkov, Ukraine
    Posts
    3,977
    Thanks
    296
    Thanked 1,306 Times in 742 Posts
    Yes, or you can add -m1=lzma2... etc.
    Unfortunately mfilter outputs a single stream, so lepton/brunsli output has to be compressed again.
    Also maybe I should make a brunsli dll from schnaader's hacked versions that doesn't use brotli for metainfo...

  8. #7
    Programmer Bulat Ziganshin's Avatar
    Join Date
    Mar 2007
    Location
    Uzbekistan
    Posts
    4,572
    Thanks
    780
    Thanked 687 Times in 372 Posts
    it seems that mfilter provides lepton-compressed output (and last time I looked into lepton, it has no feature to provide uncompressed output), and paq compression is slower but tighter than the lepton one

  9. #8
    Member
    Join Date
    Aug 2016
    Location
    Russia
    Posts
    108
    Thanks
    6
    Thanked 70 Times in 37 Posts
    Quote Originally Posted by Shelwien View Post
    So the best method might be to use mfilter with dummy lepton exe (without compression), then paq8px or cmix.
    It is possible to create additional section [2] in mfilter.ini that will describe direct call of paq8px or cmix. In this case you can use m0=mfilter:a2.

    (from another thread)
    Quote Originally Posted by Shelwien View Post
    I guess mfilter doesn't feed metainfo to brunsli at all.
    Yes, you are right.

  10. #9
    Member
    Join Date
    Aug 2016
    Location
    Russia
    Posts
    108
    Thanks
    6
    Thanked 70 Times in 37 Posts
    MFilter + paq8px_v181fix1.exe

    MFilter7z.ini:
    Code:
    [1]
    Encode=lepton\lepton-slow-best-ratio.exe "%1" "%2"
    Decode=lepton\lepton-slow-best-ratio.exe "%1" "%2"
    PipeDecode=lepton\lepton-slow-best-ratio.exe -
    Ext=lep
    [2]
    Ext=paq8
    Encode=paq8px_v181fix1\paq8px_v181fix1.exe -9 "%1" "%2"
    Decode=paq8px_v181fix1\paq8px_v181fix1.exe -d "%1" "%2"
    Result: 101401 bytes

  11. #10
    Member
    Join Date
    Aug 2008
    Location
    NZ
    Posts
    59
    Thanks
    30
    Thanked 11 Times in 7 Posts
    Not a bad result.

    However, the best compression is still gained by using paq8px_v183fix1 -9beta on the 0067.jpg file which results in a 101,192 byte file.

  12. #11
    Member
    Join Date
    Feb 2016
    Location
    USA
    Posts
    98
    Thanks
    36
    Thanked 8 Times in 8 Posts
    It is really hard to come to a definitive conclusion with only one sample file. In general packJPG ( which Lepton borrowed a lot of techniques from ) works quite well. It would be great if you could report test results on a large group of sample JPEG files with various contexts, such as people, nature, etc.

  13. #12
    Member
    Join Date
    Aug 2008
    Location
    NZ
    Posts
    59
    Thanks
    30
    Thanked 11 Times in 7 Posts
    Ran a few more compression tests using 171 jpeg image files from a HOG (Hidden Object Game). Total size of all files is 64,469,752 bytes.

    Created batch files to compress each file individually.

    Code:
    Compressor(s)                Size(bytes) Time(seconds) Commands/Options
    original files               64,469,752
    7-zip                        61,284,250           7    7z a -m0=lzma2:x9
    jojpeg (sh3)                 55,431,288         108    pa a -m0=jojpeg where "pa" was renamed from "7z"
    jojpeg+lzma2x2               53,481,658         111    pa a -m0=jojpeg -m1=lzma2:x9 -m2=lzma2:x9:lp0:lc0:pb0 -mb00s0:1 -mb00s1:2
    jojpeg+lzma2                 53,479,612         110    pa a -m0=jojpeg -m1=lzma2:x9
    paq8px183fix1                52,820,938       7,511    7z a -m0=mfilter:a2 (-9)
    lepton-slow-best-ratio       52,705,758         311    7z a -m0=mfilter:a1
    brunsli                      52,444,562          20    7a a -m0=mfilter:a0
    precomp+paq8px183fix1        52,011,550      13,480    precomp047 -cn -intense + paq8px v183fix1 -9
    precomp+paq8px183fix1        52,011,220                precomp047 -cn -intense + paq8px v183fix1 -9beta
    packjpg (version 2.5k)       51,975,698          39
    fast paq8 (version 6)        51,588,301         623    -8
    paq8px183fix1+lzma2          51,434,256       7,468    7z a -m0=mfilter:a2 -m1=lzma2:x9 (-9)
    precomp048dev                51,427,935          23    precomp048dev -cl -intense
    paq8pxdv69                   51,365,725       7,753    -s9
    reflate+paq8px183fix1        51,351,145       7,966    arc a -m0=reflate + paq8px183fix1 -9
    pzlib+paq8px183fix1          51,314,381       7,827    paq8px183fix1 -9
    paq8px183fix1                51,310,086       8,021    -9
    brunsli+lzma2                51,133,547          24    7z a -m0=mfilter:a0 -m1=lzma2:x9
    lepton-slow-best-ratio       51,131,392          49
    lepton+lzma2+paq8px183fix1   51,119,130         422    7a a -m0=mfilter:a1 -m1=lzma2:x9 -m2=mfilter:a2 (-9)
    lepton+lzma2                 51,116,016         298    7z a -m0=mfilter:a1 -m1=lzma2:x9
    precomp048+paq8px183fix1     51,068,700      13,835    precomp048dev -cn -intense + paq8px183fix1 -9
    lepton+paq8pxdv69            50,835,719      14,941    7z a -m0=mfilter:a1 + paq8pxd69 -s10
    lepton+paq8pxdv69            50,835,708      14,858    7z a -m0=mfilter:a1 + paq8pxd69 -s9
    lepton+paq8px183fix1         50,782,720      14,149    7z a -m0=mfilter:a1 + paq8px183fix1 -9
    lepton+srep+paq8px183fix1    50,768,509                lepton-slow-best-ratio + srep(v3.93) -a1 + paq8px183fix1 -9
    lepton+paq8px183fix1         50,747,070                lepton-slow-best-ratio + paq8px183fix1 -9beta; VERY slow
    Noticed that packjpg tended to produce larger than original files when compressing small files originally in the tens of kilobytes size. But packjpg performed better with good compression on larger files in the 100's of kilobytes size and up.

    EDIT: added four more compression results. More results to come later.
    EDIT2: added three more compression results. More results to come later.
    EDIT3: added paq8px at 52,820,938 bytes.
    EDIT4: added lepton standalone manually, couldn't as yet get a batch script to recurse existing directory with test files.
    EDIT5: added reflate and pzlib and standalone lepton results
    EDIT6: added precomp + paq8px183fix1
    EDIT7: added precomp048dev + paq8px183fix1
    EDIT8: added lepton+lzma2+paq8px183fix1, and lepton+srep+paq8px183fix1
    EDIT9: added compression times for most compression models
    EDIT10: added two compression models (lepton+paq8pxd69) and three times.
    EDIT 11: added 7z lzma2 and precomp048dev -cl models
    Last edited by brispuss; 25th December 2019 at 10:32. Reason: Added two compression models

  14. Thanks:

    smjohn1 (6th December 2019)

  15. #13
    Administrator Shelwien's Avatar
    Join Date
    May 2008
    Location
    Kharkov, Ukraine
    Posts
    3,977
    Thanks
    296
    Thanked 1,306 Times in 742 Posts
    1. jojpeg doesn't compress metainfo on its own, try using "pa -m0=jojpeg -m1=lzma2:x9", "pa a -m0=jojpeg -m1=lzma2:x9 -m2=lzma2:x9:lp0:lc0:pb0 -mb00s0:1 -mb00s1:2"
    2. There's Aniskin's post above about integrating paq8px into mfilter, results could be better than standalone paq8px.
    3. add brunsli, maybe new precomp too.

    Code:
    11,711,247 jpg\
    11,333,680 0.pa // pa a -m0=jojpeg 1.pa jpg                                                           
     9,161,957 1.pa // pa a -m0=lzma2:x9 0.pa jpg                                                         
     9,132,865 2.pa // pa a -m0=jojpeg -m1=lzma2:x9 2.pa jpg                                              
     9,133,254 3.pa // pa a -m0=jojpeg -m1=lzma2:x9 -m2=lzma2:x9:lp0:lc0:pb0 -mb00s0:1 -mb00s1:2 3.pa jpg

  16. #14
    Member
    Join Date
    Aug 2016
    Location
    Russia
    Posts
    108
    Thanks
    6
    Thanked 70 Times in 37 Posts
    Quote Originally Posted by brispuss View Post
    Code:
    lepton (slow version)    52,705,758          ran under original 7-zip using command 7z a -m0=mfilter:a1
    MFilter should be used with additional compression -m1=LZMA(2) because MFilter does not pass any metadata into packer. And maybe lepton.exe without MFilter will show better result.

  17. Thanks (2):

    brispuss (6th December 2019),Shelwien (6th December 2019)

  18. #15
    Member
    Join Date
    Aug 2008
    Location
    NZ
    Posts
    59
    Thanks
    30
    Thanked 11 Times in 7 Posts
    OK. Working on other compression examples.

    Modified MFilter7z.ini as per earlier post, but changed paq8px version to 183fix1 instead of version 181fix1.

    Created sub directory named paq8px_183fix1 under Codecs sub directory under 7-zip.

    Paq8px_v183fix1 executable copied to the directory paq8px_183fix1.

    So the command for lepton plus paq8px_v183fix1 PLUS lzma2 should now be 7z a -m0=mfilter:a1 -m1=mfilter:a2 -m2=lzma2:x9 0067.7z 0067.jpg (for example)?

  19. #16
    Member
    Join Date
    Feb 2016
    Location
    USA
    Posts
    98
    Thanks
    36
    Thanked 8 Times in 8 Posts
    Quote Originally Posted by brispuss View Post
    Noticed that packjpg tended to produce larger than original files when compressing small files originally in the tens of kilobytes size. But packjpg performed better with good compression on larger files in the 100's of kilobytes size and up.
    Did you remove meta-info when using packJPG ( -d )? meta-info has a large percentage for small files.

  20. #17
    Member
    Join Date
    Aug 2008
    Location
    NZ
    Posts
    59
    Thanks
    30
    Thanked 11 Times in 7 Posts
    Thanks.

    I didn't remove metadata.

  21. #18
    Member
    Join Date
    Aug 2016
    Location
    Russia
    Posts
    108
    Thanks
    6
    Thanked 70 Times in 37 Posts
    Quote Originally Posted by brispuss View Post
    So the command for lepton plus paq8px_v183fix1 PLUS lzma2 should now be 7z a -m0=mfilter:a1 -m1=mfilter:a2 -m2=lzma2:x9 0067.7z 0067.jpg (for example)?
    If you want to use MFilter+Lepton: 7z a -m0=mfilter:a1 -m1=lzma2:x9

    If you want to use MFilter+paq8: 7z a -m0=mfilter:a2 -m1=lzma2:x9

    Also what about solid compression?

  22. Thanks:

    brispuss (6th December 2019)

  23. #19
    Administrator Shelwien's Avatar
    Join Date
    May 2008
    Location
    Kharkov, Ukraine
    Posts
    3,977
    Thanks
    296
    Thanked 1,306 Times in 742 Posts
    @Aniskin:
    Btw, is it possible to get mfilter to output jpeg and metainfo to different streams?
    With that we could avoid compressing jpegs twice...

  24. #20
    Member
    Join Date
    Aug 2016
    Location
    Russia
    Posts
    108
    Thanks
    6
    Thanked 70 Times in 37 Posts
    Technically there is no problem to create such version of the codec. I will think about it.

  25. #21
    Member
    Join Date
    Aug 2008
    Location
    NZ
    Posts
    59
    Thanks
    30
    Thanked 11 Times in 7 Posts
    Added four more compression methods.

    However, having problem running lepton (lepton-slow-best-ratio) by itself. Command syntax appears when typing in lepton-slow-best-ratio.exe, but trying to compress files always brings up error - "Failed to start subprocess with command line OS_ERROR".

    Command - lepton-slow-best-ratio.exe 0067.jpg 0067.lep (for example), or even just - lepton-slow-best-ratio.exe 0067.jpg brings up this error!?

    Why getting this error message?

    BTW running under Windows 7 64 bit.

  26. #22
    Member
    Join Date
    Aug 2016
    Location
    Russia
    Posts
    108
    Thanks
    6
    Thanked 70 Times in 37 Posts
    Quote Originally Posted by brispuss View Post
    Ran a few more compression tests using 171 jpeg image files
    Imho quite strange using of MFilter. And again - MFilter should be used with additional compression -m1=LZMA(2). MFilter separates input jpeg file to metadata and jpeg data, then pass jpeg data into selected jpeg coder. So if you don`t use -m1=LZMA(2) all metadata will be without any compression and additionally result will have overhead added by 7Z file format and MFilter codec. And simple using of Lepton/Brunsli/PAQ will give you better results because they compress metadata.

    Code:
    lepton+paq8px            52,820,938          7z a -m0=mfilter:a2 <- not the same size as last entry at 50,782,720 despite similar processing!?
    This is not lepton+paq8px. This is paq8px only. Metadata without any compression. And simple paq8px give you better result.

    Code:
     lepton (slow version)    52,705,758          ran under original 7-zip using command 7z a -m0=mfilter:a1
    Metadata without any compression. Simple Lepton.exe may give you better result.

    Code:
    brunsli                  52,444,562          7a a m0=mfilter:a0
    Metadata without any compression. Simple Brunsli.exe may give you better result.

    Code:
    lepton+paq8px+lzma2      51,434,256          7z a -m0=mfilter:a2 -m1=lzma2:x9
    This is not lepton+paq8px+lzma2. This is paq8px+lzma2.

  27. Thanks:

    brispuss (7th December 2019)

  28. #23
    Member
    Join Date
    Aug 2008
    Location
    NZ
    Posts
    59
    Thanks
    30
    Thanked 11 Times in 7 Posts
    Thanks for clarifying. I'll amend compression descriptions in a while.

    Now regarding lepton-slow-best-ratio, which doesn't seem to work properly as described in my post above.

    From quick search on the 'net, it seems the issue may be due to how "lepton" has been coded. It seems that lepton has to be placed within the current working directory in order for it to find files to process(?) If so, what batch script, if any, will effectively place lepton within recursed directories in order for it to locate and process (jpg) files?

  29. #24
    Member
    Join Date
    Aug 2008
    Location
    NZ
    Posts
    59
    Thanks
    30
    Thanked 11 Times in 7 Posts

    Getting Batch File to Work for Lepton

    As mentioned in previous post, getting lepton to run is a bit difficult as it apparently requires to be located in the current working directory of files to be processed.

    Currently lepton-slow-best-ratio.exe is located in c:\lepton directory. Jpeg files to be processed are located in directory c:\test, plus, there are sub-directories as well.

    So what is wanted is a batch script that would "effectively" allow lepton-slow-best-ratio.exe to run in the c:\test directory and process files in this directory and also recurse into sub-directories as well.

    Any ideas please?

  30. #25
    Administrator Shelwien's Avatar
    Join Date
    May 2008
    Location
    Kharkov, Ukraine
    Posts
    3,977
    Thanks
    296
    Thanked 1,306 Times in 742 Posts
    I just downloaded https://github.com/dropbox/lepton/re...best-ratio.exe
    and tried running it like this:
    Code:
    C:\>C:\Users\Shelwien\Downloads\lepton-slow-best-ratio.exe C:\9A6T-jpegdet\A10.jpg
    lepton v1.0-08c52d9280df3d409d9246df7ff166dd94628730
    lepton v1.0-08c52d9280df3d409d9246df7ff166dd94628730
    7511941 bytes needed to decompress this file
    672236 842468
    79.79%
    lepton v1.0-08c52d9280df3d409d9246df7ff166dd94628730
     bytes needed to decompress this file
    672236 842468
    79.79%
    and it works.

    And for recursive processing you can do something like this:
    Code:
    cd /d C:\test
    for /R %a in (*.j*) do C:\lepton\lepton-slow-best-ratio.exe "%a"

  31. Thanks:

    brispuss (10th December 2019)

  32. #26
    Member
    Join Date
    Aug 2008
    Location
    NZ
    Posts
    59
    Thanks
    30
    Thanked 11 Times in 7 Posts
    Thanks for the script! It works!

    Don't know why I didn't think of this method before!?

    Anyway, I'll experiment a bit more with lepton and other (pre)processors and see what compression results are obtained and update the compression test list as required.

  33. #27
    Member
    Join Date
    Dec 2019
    Location
    China
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy

    Quote Originally Posted by brispuss View Post
    Ran a few more compression tests using 171 jpeg image files from a HOG (Hidden Object Game). Total size of all files is 64,469,752 bytes.

    Created batch files to compress each file individually.

    Code:
    
    
    original files           64,469,752 bytes
    jojpeg (version sh3)     55,431,288          under 7-zip modified (7zdll) using command pa a -m0=jojpeg where "pa" was renamed from "7z"
    jojpeg+lzma2x2           53,481,658          pa a -m0=jojpeg -m1=lzma2:x9 -m2=lzma2:x9:lp0:lc0:pb0 -mb00s0:1 -mb00s1:2
    jojpeg+lzma2             53,479,612          pa a -m0=jojpeg -m1=lzma2:x9
    paq8px v183fix1          52,820,938          7z a -m0=mfilter:a2 -9 option
    lepton (slow version)    52,705,758          ran under original 7-zip using command 7z a -m0=mfilter:a1
    brunsli                  52,444,562          7a a m0=mfilter:a0
    precomp+paq8px183fix1    52,011,550          precomp 047 -cn -intense + paq8px v183fix1 -9
    precomp+paq8px183fix1    52,011,220          precomp 047 -cn -intense + paq8px v183fix1 -9beta
    packjpg (version 2.5k)   51,975,698
    fast paq8 (version 6)    51,588,301          using option -8
    paq8px+lzma2             51,434,256          7z a -m0=mfilter:a2 -m1=lzma2:x9 -9 option
    paq8pxd (version 69)     51,365,725          using option -s9
    reflate+paq8px183fix1    51,351,145          -9 option
    pzlib+paq8px183fix1      51,314,381          -9 option
    paq8px (version 183fix1) 51,310,086          using option -9
    brunsli+lzma2            51,133,547          7z a -m0=mfilter:a0 -m1=lzma2:x9
    lepton (direct)          51,131,392          lepton-slow-best-ratio
    lepton+lzma2             51,116,016          7z a -m0=mfilter:a1 -m1=lzma2:x9
    precomp048+paq8px183fix1 51,068,700          precomp 048dev -cn -intense + paq8px183fix1 -9
    lepton+paq8px183fix1     50,782,720          7z a -m0=mfilter:a1 PLUS paq8px_v183fix1 -9 manually
    lepton+paq8px183fix1     50,747,070          standalone versions of lepton and paq8px_v183fix1 -9beta option; VERY slow
    Noticed that packjpg tended to produce larger than original files when compressing small files originally in the tens of kilobytes size. But packjpg performed better with good compression on larger files in the 100's of kilobytes size and up.

    EDIT: added four more compression results. More results to come later.
    EDIT2: added three more compression results. More results to come later.
    EDIT3: added paq8px at 52,820,938 bytes.
    EDIT4: added lepton standalone manually, couldn't as yet get a batch script to recurse existing directory with test files.
    EDIT5: added reflate and pzlib and standalone lepton results
    EDIT6: added precomp + paq8px183fix1
    EDIT7: added precomp048dev + paq8px183fix1
    I did this experiment, but it doesn't work, could you please share your jpeg image files? Then we can further illustrate this result. Thank you very much.

  34. #28
    Member
    Join Date
    Aug 2008
    Location
    NZ
    Posts
    59
    Thanks
    30
    Thanked 11 Times in 7 Posts
    Quote Originally Posted by chengde View Post
    I did this experiment, but it doesn't work, could you please share your jpeg image files? Then we can further illustrate this result. Thank you very much.
    The test image files compressed with 7-zip come to around 57.5 MB.

    I can't upload these images here as there is a 25 MB attachment size limit.

    Also, as I am on a very SLOW internet connection, it would take me at least 5 hours to upload the image files.

    Looking at uploading the test image files to a free online storage facility, but I am having difficulty creating free accounts at some free online storage facilities, possibly due to my slow internet connection!?

    So at this time I am unable to provide copies of the test images. Maybe sometime later?

    In the meantime, sorry!

  35. #29
    Member
    Join Date
    Aug 2018
    Location
    India
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    There is no way loseless compression can be achieved by JPEG compression techniques. There could be mechanism to minimize the impact. Try using https://miniimagesvideos.com

  36. #30
    Member
    Join Date
    Aug 2008
    Location
    NZ
    Posts
    59
    Thanks
    30
    Thanked 11 Times in 7 Posts
    Thanks for the comment.

    My intention is to losslessy compress jpeg images for archiving purposes. Later when required, these archived images will be decompressed back to their original uncompressed state. The decompressed images have to be exactly bit identical to the original uncompressed images. The reason for this is to ensure that these images will run properly under programs from which these images were taken from. If the images are not the same size as the original images, then programs may crash, freeze etc.

    The link is for lossy compression of images. This is not what is wanted.

    Anyway, I have several standalone offline programs which compress images by lossy methods, but these are used for non-archiving purposes only. The best program, by the way, seems to be File Minimizer which can provide extremely high compression compared to other programs.

Page 1 of 2 12 LastLast

Similar Threads

  1. Why does progressive helps compression so much in jpg's
    By SvenBent in forum Data Compression
    Replies: 5
    Last Post: 17th May 2014, 13:20
  2. .bik no lossless compression?
    By Tidro in forum Data Compression
    Replies: 2
    Last Post: 4th September 2013, 18:39
  3. the zero redunduncy in zpaq normal jpg compression
    By toi007 in forum Data Compression
    Replies: 3
    Last Post: 16th August 2012, 23:40
  4. lossless data compression
    By SLS in forum Data Compression
    Replies: 21
    Last Post: 15th March 2011, 11:35
  5. JPG COMPRESSION
    By Bulat Ziganshin in forum Forum Archive
    Replies: 4
    Last Post: 8th May 2007, 14:49

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •