Results 1 to 4 of 4

Thread: BMX as become a bit better in Image2BMX lossy format to fight jpg

  1. #1
    Member toi007's Avatar
    Join Date
    Jun 2011
    Location
    Lisbon
    Posts
    35
    Thanks
    0
    Thanked 0 Times in 0 Posts

    BMX as become a bit better in Image2BMX lossy format to fight jpg

    FIRST OF ALL I RENEW MY WEBSITE http://www.compressordeimagens.com
    THERE IS THE IMAGE2BMXGRID4.EXE AND ALL THIS FILES AND EXPLANATION IN ENGLISH AND IN PORTUGUESE

    DENOTE THAT THA FACT THAT LUMINOSITY=0 AND UV=0 GIVES LOSSLESS COMPRESSION
    but that converting a png to bmp and zpaq it does tha same trick ZPAQ does Rules

    the program
    http://www.compressordeimagens.com/Image2BMX.zip

    the 100 samples in 16.511 Kb
    http://www.compressordeimagens.com/100 samples jpgs.zip

    the 100 samples compressed in 13.938Kb
    http://www.compressordeimagens.com/1...s bmx.zpaq.zip

    and now some updates on gradient mesh bmx compression

    the program
    http://www.compressordeimagens.com/image2bmx3.zip

    the same 100 compressed images in 13.368 (better quality in gradients and less 500Kb in 100 samples
    http://www.compressordeimagens.com/1...s L15 UV40.zip
    Last edited by toi007; 19th November 2011 at 13:30. Reason: a bit of zpaq promotion

  2. #2
    Expert
    Matt Mahoney's Avatar
    Join Date
    May 2008
    Location
    Melbourne, Florida, USA
    Posts
    3,255
    Thanks
    306
    Thanked 778 Times in 485 Posts
    Maybe some explanation of what your program does? As I understand:

    1. Program reads JPG or BMP. If JPG, convert to BMP.
    2. Converts to BMX format (lossy).
    3. Compress with zpaq -mbmp_j4 (model optimized for BMP).
    4. image.bmx.zpaq is smaller than image.jpg with similar subjective quality.

    So what is the BMX algorithm? Earlier I presented a simple algorithm that transforms color (R, G, B) -> (G, G-R, G-B) then drops the low 3 bits of G and low 4 bits of G-R, G-B. Quality is similar to medium JPEG but there is some visible banding over smooth areas. Does BMX fix this, and how?

    Also, the new version of zpaq (Nov. 13) should be faster without an external C++ compiler. http://mattmahoney.net/dc/zpaq.html
    You can get bmp_j4.cfg there too (bmp_j4a.zip).

  3. #3
    Member
    Join Date
    Sep 2008
    Location
    France
    Posts
    856
    Thanks
    447
    Thanked 254 Times in 103 Posts
    Banding side-effect can be corrected by integrating noise into the threshold formula and rendering.
    It however hurts compression a bit, since the last significant bit is slightly less predictable.

  4. #4
    Member toi007's Avatar
    Join Date
    Jun 2011
    Location
    Lisbon
    Posts
    35
    Thanks
    0
    Thanked 0 Times in 0 Posts

    People People im quite off the track since im not a porgrammer

    well the BMX is lossy and the last version of grid gradient uses luminosity of 8 pixel by 8 pixel only the corners if the middle grid poins are not abs variant than the luminosity degree the put 0 and calculates the grandient form 4 points for that pixel of luminosity
    If it passes the gradient grid it might not pass the similaraty of the corners so I put 1 or 2 or 3 or 4 if its diferent form this criteria goes to actual value of luminosity
    soo the file gets lots of 0 and 1 and 2 and 3 and 4 preferebly zeros
    exept for the 8 by 8 pixels on the corners of the grid
    thats luminance or luminosity in the green channel
    for the other 2 carecteristics of light i use the blue and red channel U=blue V=red its a linnear aproach and for good compresion the abs value of UV most be like 25 or 30 or 40 to be able to put same value if not diferent from like 40 diference value
    but in 32 to 32 pixels I actualize the line of UV in real value of RED AND BLUE
    so this two passes and blitz basic low porcessing in speed gives lots bad performance
    but the final result in size gets sometimes of some apreciation and to rebuild the bmx file just input the file as bmx in the same porgram to see if thes no much distortion
    some distortion will ocurr bigger the luminosity degree less detail and big values on chomoradiance and crhomoluminosity gives color distortion
    but do take a look even more for the 100 samples of national geografic wallpapers that i needed for exemples of files as 1024x768 pixels
    now im going to take a look ate sir matt mahoney zpaq compression aproch on bmp which is the same format that I store the bmx file

    and now the grid 4 of BMX lower grid presents more detail and the luminosity degree of compression can be putted to work on high leveles like 30 and it gets just 62% of the original jpg size

    INSTRUCTIONS

    for image2BMXgrid4.exe

    execute the program

    on the image input type sample010.jpg as an example
    on the luminosity degree of compression put value from 0- almost lossless to 255 totaly blured
    15 to 30 gives good values
    if you lose to much detail to the blured image just put low values there

    on the UV value degree of compression put the value of color distortion 0 to none 255 to highly compressed

    values from 30 to 40 gives good size in disk
    if you having square problems on color just put lower values there

    let the program acept the pjg or png or bmp of 1024x768 image and process it
    the first step it puts values in grid 4x4 of luminosity
    and puts 0 in the middle if the luminosity pixel is on the range of the 4 points gradient
    puts 1 2 3 4 if out of gradient range luminosity but inside the porximity of each corner
    puts the real value (5 if less than 5) up to 255 in luminosity if the range is not complied

    the second step linear UB on Red and blue channel but equal to previous pixel if the range of diference is lower
    than the previous pixel UV
    it marks from 32 to 32 pixels the current UV value

    the third step is to save the BMX that is a BMP of this low values and compresses outside with
    zpaq.exe -mbmp_j4 c sample010.bmx.zpaq sample010.bmx

    and at the same time reconstruct the image in screen

    for rebuilding the image from bmx.zpaq uncompress the bmx
    for rebuilding the image from bmx just execute the program
    and on the input file type image put sample010.bmx

    if the extention is bmx on the input image it doesnt compress but it rebuilds a sample010.remade.bmp

    note that to store the file you only need bmx.zpaq

    i have no istructions for the batch exe because it only works from number 1 or 20 or 40 to number 1+88
    it crashes on 88 filse in a row
    and it only processes filenames of sample001.jpg to sample088.jpg

    besides the batch file may be confuse if the zpaq dos windows over come in velocity



    off course if you recompress a jpg to this size you might get better quality results and sometimes bmx quality still is very subjective only comparing same size files on jpg to bmx can be telling you the better one
    (I still choose Jpgs

    PROGRAM : http://www.compressordeimagens.com/BMXgrid4.zip

    100 ORIGINAL SAMPLES : 16.510Kb http://www.compressordeimagens.com/100 samples jpgs.zip

    100 COMPRESSED SAMPLES : 9,650 KB 60% of the original : http://www.compressordeimagens.com/1...L=30 UV=40.zip
    Attached Files Attached Files
    Last edited by toi007; 17th November 2011 at 13:56. Reason: added links

Similar Threads

  1. One lossy BMP format that failed by a lot!
    By toi007 in forum The Off-Topic Lounge
    Replies: 0
    Last Post: 29th June 2011, 00:53
  2. Lossy 3D Object transformation
    By EwenG in forum Data Compression
    Replies: 13
    Last Post: 24th February 2011, 14:29
  3. Winzip v12.0 with JPG recompression & 7z support
    By maadjordan in forum Data Compression
    Replies: 3
    Last Post: 12th September 2008, 23:58
  4. Bit Archive Format
    By osmanturan in forum Forum Archive
    Replies: 39
    Last Post: 29th December 2007, 00:57
  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
  •