JPEG Arithmetic

Ask for help and post your question on how to use XnView Classic.

Moderators: XnTriq, helmut, xnview

Post Reply
User avatar
maadjordan
Posts: 25
Joined: Thu Oct 30, 2003 8:33 pm

JPEG Arithmetic

Post by maadjordan »

Dear Pierre,

hi, it has been a long time..
i would like to request adding support for reading jpeg with ARITHMETIC or (jpeg-ARI) like the extension of jpeg-6b as it provide smaller ( more compact) jpeg files than huffman type..

there is a tool than can read/write it (including huffman and optimized-huffman) called "jpegcrop"

it also can convert jpeg from type to another (ari to huff..) LOSSLESSLY which i'd like to see it in XnView in comping releases..
i think this should the trend when handling lossy formats in order to keep quality unchanged (at least for JPEG now..)

it is helpful for add/remove comments on jpeg (or tiff-jpeg)

yours

MAAD
XnView Arabic Support
User avatar
xnview
Author of XnView
Posts: 43326
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: jpeg arithmetic

Post by xnview »

Dear Maad,
maadjordan wrote:i would like to request adding support for reading jpeg with ARITHMETIC or (jpeg-ARI) like the extension of jpeg-6b as it provide smaller ( more compact) jpeg files than huffman type..
Do you have an example of files in JPEG ARI?
Regards. Pierre.
maad

Post by maad »

hi Pierre,

here is the site for a window tool that make a arithmetic jpeg (losslessly)

http://sylvana.net/jpegcrop/

MAAD
prof_unto
Posts: 3
Joined: Sat Nov 25, 2006 4:43 pm

Post by prof_unto »

I have jpeglib with arithmetic function (taken from jpegcrop source code)
Does anybody know how to build plugin with this library?
User avatar
Drahken
Posts: 884
Joined: Sun Apr 10, 2005 4:29 pm

Post by Drahken »

Main problem with using arithmetic coding (especially in a freeware prog) is that there are a lot of patents on it (similar situation to he gif format, before the gif patents ran out).
Oh the feuhrer, oh the feuhrer, oh the feuhrer's nipples bonk!
User avatar
foxyshadis
Posts: 390
Joined: Sat Nov 18, 2006 8:57 am

Post by foxyshadis »

If you're up for fun and games, you can always just swap out a range coder backend. There's no known patents on that, though it's rather similar to arithmetic; and even if there's no support either, it's not like jpeg-arith is any better. (It's much faster than arithmetic too, being integer-only.)

You'd probably need a new extension for an arithmetic filetype anyway, unless you fancy breeding confusion. .jpa, .jpr, something like that.
prof_unto
Posts: 3
Joined: Sat Nov 25, 2006 4:43 pm

Post by prof_unto »

Drahken wrote:Main problem with using arithmetic coding (especially in a freeware prog) is that there are a lot of patents on it (similar situation to he gif format, before the gif patents ran out).
Yeah I know about the patent, but I just wanna build & keep it for my self something like testing purposes only :mrgreen:
Waldo
Posts: 8
Joined: Fri Feb 22, 2008 1:47 am

Re: JPEG Arithmetic

Post by Waldo »

Sorry, for bumping this old thread, but I don't think this topic needs a new thread... so:

Will there ever be arithmetic JPEG support in XnView?

I just tested it on some JPGs using the jpegtran tool and the results in size savings are amazing.
User avatar
Drahken
Posts: 884
Joined: Sun Apr 10, 2005 4:29 pm

Re: JPEG Arithmetic

Post by Drahken »

I strongly doubt it, considering the fact that there's really no place to use arith-jpegs, except for storage, since few other applications have any support for it. ...and if you're just going to use it to save disk space or some such, you're better off just using a different format, one with both better support AND better compression. There are also jpeg repacking programs out there (packjpg for one) which can repack jpg images with more efficient algorithms and whatnot, they claim to reduce the filesize by 15~25%, without altering the quality. The drawback is that these images can usually only be opened or reconverted by the progs that created them, because they're no longer true jpgs.
Oh the feuhrer, oh the feuhrer, oh the feuhrer's nipples bonk!
User avatar
maadjordan
Posts: 25
Joined: Thu Oct 30, 2003 8:33 pm

Re: JPEG Arithmetic

Post by maadjordan »

v8 of IJG implementation is out please pierre take a look.. arithmatic is official now.. http://www.ijg.org/
XnView Arabic Support
chameleon
Posts: 7
Joined: Wed May 25, 2011 6:28 pm

Re: JPEG Arithmetic

Post by chameleon »

Arithmetic coding in JPEG files supported from jpeglib.
GIMP also support them.
It seems that all of patents granded until 1992, so all of them are expired (20 years passed).
https://en.wikipedia.org/wiki/Arithmetic_coding#Patents
https://en.wikipedia.org/wiki/Term_of_p ... ted_States

I create a C++ program with JPEG export and I found that XnView cannot support arithmetic coding! For a few moments I believe that my code is buggy, but it is not the situation.
User avatar
xnview
Author of XnView
Posts: 43326
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: JPEG Arithmetic

Post by xnview »

chameleon wrote: Tue Aug 18, 2020 6:39 pm Arithmetic coding in JPEG files supported from jpeglib.
GIMP also support them.
It seems that all of patents granded until 1992, so all of them are expired (20 years passed).
https://en.wikipedia.org/wiki/Arithmetic_coding#Patents
https://en.wikipedia.org/wiki/Term_of_p ... ted_States

I create a C++ program with JPEG export and I found that XnView cannot support arithmetic coding! For a few moments I believe that my code is buggy, but it is not the situation.
could you try with XnView MP?
Pierre.
Post Reply