ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* [NTG-context] JPEG 2000 extensions
@ 2025-01-11  0:47 Jim
  2025-01-11 10:48 ` [NTG-context] " Hans Hagen
  0 siblings, 1 reply; 3+ messages in thread
From: Jim @ 2025-01-11  0:47 UTC (permalink / raw)
  To: ntg-context

Hi,

in .../tex/texmf-context/tex/context/base/mkiv/grph-inc.lua I see (at line
333)
            ["jp2"]    = { list = { "jp2" } },

That is (AIUI) the proper extension for JPEG2000 (Part 1) images.
The JPEG2000 (Part 2) images I looked at have the same magic bytes as
listed in line 349 of that file.

AIUI, JPEG2000 (Part 2) images should have the extension .jpx.  Is it
possible to change line 333 to read

            ["jp2"]    = { list = { "jp2", "jpx" } },

?

(I hope this is the only change needed.)

I may be the only (vocal) person using .JPX files right now, but in the
years to come, who knows how many people will use it?

Thanks.

                                Jim

P.S.  I know that I can use
        \definegraphictypesynonym [jpx] [jp2]
      but in the interest of helping others who may run into this issue in
      the future, ...
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [NTG-context] Re: JPEG 2000 extensions
  2025-01-11  0:47 [NTG-context] JPEG 2000 extensions Jim
@ 2025-01-11 10:48 ` Hans Hagen
  2025-01-11 14:54   ` Jim
  0 siblings, 1 reply; 3+ messages in thread
From: Hans Hagen @ 2025-01-11 10:48 UTC (permalink / raw)
  To: ntg-context

On 1/11/2025 1:47 AM, Jim wrote:
> Hi,
> 
> in .../tex/texmf-context/tex/context/base/mkiv/grph-inc.lua I see (at line
> 333)
>              ["jp2"]    = { list = { "jp2" } },
> 
> That is (AIUI) the proper extension for JPEG2000 (Part 1) images.
> The JPEG2000 (Part 2) images I looked at have the same magic bytes as
> listed in line 349 of that file.
> 
> AIUI, JPEG2000 (Part 2) images should have the extension .jpx.  Is it
> possible to change line 333 to read
> 
>              ["jp2"]    = { list = { "jp2", "jpx" } },
> 
> ?
> 
> (I hope this is the only change needed.)
> 
> I may be the only (vocal) person using .JPX files right now, but in the
> years to come, who knows how many people will use it?
> 
> Thanks.
> 
>                                  Jim
> 
> P.S.  I know that I can use
>          \definegraphictypesynonym [jpx] [jp2]
>        but in the interest of helping others who may run into this issue in
>        the future, ...

did you check if pdf viewers can handle both? or is it just a suffix issue

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [NTG-context] Re: JPEG 2000 extensions
  2025-01-11 10:48 ` [NTG-context] " Hans Hagen
@ 2025-01-11 14:54   ` Jim
  0 siblings, 0 replies; 3+ messages in thread
From: Jim @ 2025-01-11 14:54 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi Hans,

On Sat, Jan 11, 2025 at 11:48 (+0100), Hans Hagen wrote:

> On 1/11/2025 1:47 AM, Jim wrote:
>> Hi,

>> in .../tex/texmf-context/tex/context/base/mkiv/grph-inc.lua I see (at line
>> 333)
>>              ["jp2"]    = { list = { "jp2" } },

>> That is (AIUI) the proper extension for JPEG2000 (Part 1) images.
>> The JPEG2000 (Part 2) images I looked at have the same magic bytes as
>> listed in line 349 of that file.

>> AIUI, JPEG2000 (Part 2) images should have the extension .jpx.  Is it
>> possible to change line 333 to read

>>              ["jp2"]    = { list = { "jp2", "jpx" } },

>> ?

>> (I hope this is the only change needed.)

>> I may be the only (vocal) person using .JPX files right now, but in the
>> years to come, who knows how many people will use it?

>> Thanks.

>> Jim

>> P.S.  I know that I can use
>>          \definegraphictypesynonym [jpx] [jp2]
>> but in the interest of helping others who may run into this issue in
>> the future, ...

> did you check if pdf viewers can handle both? or is it just a suffix issue

All the PDF viewers (and other tools) I tried can handle JPX files.  These
include
- (ancient) Adobe acroread for Linux
- evince
- kpdf
- firefox and chromium's PDF viewers
- emacs' pdfview
- xpdf
- diffpdf
- ghostview
- mupdf
- qpdfview
- okular
- zathura
- xournal
- xournalpp
Admittedly, the list isn't exhaustive, but large enough that I think it
makes sense to provide support for JPX.

It is more than a suffix issue, as (for example) the "file" program knows
the different between Part 1 and Part 2 versions of JPEG2000 files.

Further, the tool I access to create Part 2 images from (ordinary) JPEGs
creates considerably smaller images than the tools I have to create Part 1
images (with no apparent loss of quality).  I do not know enough about the
differences to comment on the likelihood that a viewer will handle Part 1
but not Part 2, but I can say I haven't seen such a thing yet.

(In about a year and a half of using Part 2 images in a monthly newsletter
I edit, I have only had one person complain once about not being able to
see the images; this person is known to have ancient software on his
computer, and he only mentioned it once, which makes me think he used a
different program to look at the newsletter one month.)

Cheers.
                                Jim
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-01-11 14:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-01-11  0:47 [NTG-context] JPEG 2000 extensions Jim
2025-01-11 10:48 ` [NTG-context] " Hans Hagen
2025-01-11 14:54   ` Jim

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).