[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: xv




On Sat, May 22, 2021 at 2:33 PM Thomas Schmitt <scdbackup@gmx.net> wrote:
Hi,

Charlie Gibbs wrote:
> <filename>: Unsupported JPEG process: SOF type 0xc2

My xv reports this on Progressive JPEG images like
  http://www.reasoft.com/tutorials/web/img/progress.jpg

My xv binary stems from source xv-3.10a.tar.gz of june 2000.
Its Makefile indicates that it gets linked statically with a libjpeg.a
which the source tarball brings in subdirectory ./jpeg.

The file jpeg/jdmarker.c in this libjpeg copy emits the error for many SOF
types. See line 771 ff. and JERR_SOF_UNSUPPORTED in jpeg/jerror.h.

In contrast to that, the library
  /usr/lib/x86_64-linux-gnu/libjpeg.a
of package libjpeg62-turbo-dev supports SOF2:
  https://sources.debian.org/src/libjpeg-turbo/1:2.0.6-4/jdmarker.c/?hl=1000#L1000

So an adventurous programmer could try to trick the old xv into linking
Debian's libjpeg.a, or could try to replace the source in xv's ./jpeg by the
source of Debian's libjpeg-turbo.

----------------------------------------------------------------------------

My personal solution is different, as i find xv's display of oversized images
abysmal, while the beautiful results of ImageMagic's "convert" can cost
gigabytes of RAM if the input is large enough.
So i created a program based on libjpeg which reads JPEGs line by line
and emits the resized result line by line. The resizer works with a
discrete rectangular pixel model rather than a continous space.

As windfall profit this program can read progressive JPEGs with SOF2 and
stores its results as sequential JPEGs which xv can read.

(I can provide its source code under BSD license if no better converter
can be found.)


Have a nice day :)

Thomas


Thomas, that sounds awesome, please do post somewhere (and provide a link here, if you would be so kind).

I would like to try it out, and i'll bet others would too. 

dan

Reply to: