This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: ATTN: jpeglib maintainer


Jörg Schaible wrote:
> ======= %< =======
> $ LANG=C make
> gcc  -g -O2  -DHAVE_CONFIG_H   -c -o jpeginfo.o jpeginfo.c
> jpeginfo.c: In function `main':
> jpeginfo.c:323: error: structure has no member named `progressive_mode'
> jpeginfo.c:333: error: structure has no member named `progressive_mode'
> make: *** [jpeginfo.o] Error 1
> ======= %< =======

Yep, that's because 
  (1) cygwin's libjpeg uses the lossless jpeg patch, which is needed for
  certain medical imagery
  (2) the lossless jpeg patch changes only the "private" interface of
  libjpeg [*]
  (3) jpeginfo is "breaking the rules" and accessing private data (e.g.
  "progressive_mode" is nonpublic even tho it is defined in (pristine)
  jpeglib.h).

Of course, the "rules" aren't really that strict, and progressive_mode
isn't REALLY private...so it's a grey area.

[*] pristine jpeglib.h looks like this:
  /* Remaining fields are known throughout compressor, but generally
   * should not be touched by a surrounding application.
   */
  boolean progressive_mode;     /* TRUE if scan script uses progressive
  mode */


So, what to do?  On cygwin, I think you just need to do something like
this:

#ifdef __CYGWIN__
# define CHECK_PROGRESSIVE(cinfo) (cinfo->process == JPROC_PROGRESSIVE)
#else
# define CHECK_PROGRESSIVE(cinfo) (cinfo->progressive_mode)
#endif

and replace all accesses to progressive_mode with this macro.  Note that
you'll also need to do something similar for the change:
 'width_in_blocks' --> 'width_in_data_units'
 'height_in_blocks' --> 'height_in_data_units'
But search the archives for more information about these two beasties.

There has been some movement in recent months on the jpeglib mailing
list about rolling out a jpeg-6c (and possibly a jpeg-7).  It is an open
question whether that process may eventually fold something like
lossless jpeg into the main codebase in a non-disruptive way.  We'll
just have to wait and see.

--
Chuck
 
--
  Charles Wilson
  cygwin at removespam cwilson dot fastmail dot fm


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]