<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
  <!ENTITY % general-entities SYSTEM "../../general.ent">
  %general-entities;

  <!ENTITY openjpeg2-download-http "&sourceforge-repo;/openjpeg.mirror/openjpeg-&openjpeg2-version;.tar.gz">
  <!ENTITY openjpeg2-download-ftp  " ">
  <!ENTITY openjpeg2-md5sum        "f6419fcc233df84f9a81eb36633c6db6">
  <!ENTITY openjpeg2-size          "1.7 MB">
  <!ENTITY openjpeg2-buildsize     "13 MB">
  <!ENTITY openjpeg2-time          "0.1 SBU">
]>

<sect1 id="openjpeg2" xreflabel="OpenJPEG-&openjpeg2-version;">
  <?dbhtml filename="openjpeg2.html"?>

  <sect1info>
    <othername>$LastChangedBy: bdubbs $</othername>
    <date>$Date: 2015-02-25 17:44:17 -0500 (Wed, 25 Feb 2015) $</date>
  </sect1info>

  <title>OpenJPEG-&openjpeg2-version;</title>

  <indexterm zone="openjpeg2">
    <primary sortas="a-openjpeg2">OpenJPEG</primary>
  </indexterm>

  <sect2 role="package">
    <title>Introduction to OpenJPEG</title>

    <para><application>OpenJPEG</application> is an open-source implementation
    of the JPEG-2000 standard. OpenJPEG fully respects the JPEG-2000 specifications
    and can compress/decompress lossless 16-bit images.</para>

    &lfs77_checked;

    <bridgehead renderas="sect3">Package Information</bridgehead>
    <itemizedlist spacing="compact">
      <listitem>
        <para>Download (HTTP): <ulink url="&openjpeg2-download-http;"/></para>
      </listitem>
      <listitem>
        <para>Download (FTP): <ulink url="&openjpeg2-download-ftp;"/></para>
      </listitem>
      <listitem>
        <para>Download MD5 sum: &openjpeg2-md5sum;</para>
      </listitem>
      <listitem>
        <para>Download size: &openjpeg2-size;</para>
      </listitem>
      <listitem>
        <para>Estimated disk space required: &openjpeg2-buildsize;</para>
      </listitem>
      <listitem>
        <para>Estimated build time: &openjpeg2-time;</para>
      </listitem>
    </itemizedlist>

    <bridgehead renderas="sect3">OpenJPEG Dependencies</bridgehead>

    <bridgehead renderas="sect4">Required</bridgehead>
    <para role="required">
      <xref linkend="cmake"/>
    </para>

    <bridgehead renderas="sect4">Optional</bridgehead>
    <para role="optional">
    <xref linkend="lcms2"/>,
    <xref linkend="libpng"/>,
    <xref linkend="libtiff"/>, and
    <xref linkend="doxygen"/> (to build the API documentation)
    </para>

    <para condition="html" role="usernotes">User Notes:
    <ulink url="&blfs-wiki;/openjpeg2"/></para>

  </sect2>

  <sect2 role="installation">
    <title>Installation of OpenJPEG</title>

    <para>
      Install <application>OpenJPEG</application> by running the
      following commands:
    </para>

<screen><userinput>mkdir build &amp;&amp;
cd    build &amp;&amp;

cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr .. &amp;&amp;
make</userinput></screen>

    <para>If you have built the test suite and wish to run it, issue:
    <command>make test</command>.</para>

    <para>Now, as the <systemitem class="username">root</systemitem> user:</para>

<screen role="root"><userinput>make install &amp;&amp;
cd ../doc &amp;&amp;

for man in man/man?/* ; do
    install -v -D -m 644 $man /usr/share/$man
done</userinput></screen>

  </sect2>

  <sect2 role="commands">
    <title>Command Explanations</title>

    <para><option>-DBUILD_TESTING=ON</option>: This switch enables
    building the test suite.</para>

  </sect2>

  <sect2 role="content">
    <title>Contents</title>

    <segmentedlist>
      <segtitle>Installed Programs</segtitle>
      <segtitle>Installed Libraries</segtitle>
      <segtitle>Installed Directories</segtitle>

      <seglistitem>
        <seg>opj_compress, opj_decompress, and opj_dump</seg>
        <seg>libopenjp2.so</seg>
        <seg>/usr/include/openjpeg-2.1 and /usr/lib/openjpeg-2.1</seg>
      </seglistitem>
    </segmentedlist>

    <variablelist>
      <bridgehead renderas="sect3">Short Descriptions</bridgehead>
      <?dbfo list-presentation="list"?>
      <?dbhtml list-presentation="table"?>

      <varlistentry id="opj_compress">
        <term><command>opj_compress</command></term>
        <listitem>
          <para>converts various image formats to the jpeg2000 format.</para>
          <indexterm zone="openjpeg2 opj_compress">
            <primary sortas="b-opj_compress">opj_compress</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="opj_decompress">
        <term><command>opj_decompress</command></term>
        <listitem>
          <para>converts jpeg2000 images to other image types.</para>
          <indexterm zone="openjpeg2 opj_decompress">
            <primary sortas="b-opj_decompress">opj_decompress</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="opj_dump">
        <term><command>opj_dump</command></term>
        <listitem>
          <para>reads in a jpeg2000 image and dumps the contents to stdout.</para>
          <indexterm zone="openjpeg2 opj_dump">
            <primary sortas="b-opj_dump">opj_dump</primary>
          </indexterm>
        </listitem>
      </varlistentry>

    </variablelist>

  </sect2>

</sect1>
