@DATABASE akLJPG_Documentation
@WIDTH 80

##
## For reading this file you may use :
##
##  Program-Name    available at
##
##  - AmigaGuide    (various Packages)
##  - MultiView     (Workbench)
##  - PowerGuide    (Aminet CDs)
##

@NODE MAIN "akLJPG : Documentation"


                         akLJPG.datatype V43.60

                       - licenseable FREEWARE -

           © 1997 by Andreas Ralph Kleinert. All rights reserved.
                     (also see Copyright notices below)

                    A PerSuaSiVe SoftWorX PRODUCT.

                        Needs Kickstart V3.x

                     Release Date : 20.04.1997


              @{i}<Commercial>@{ui} @{"BTW: What is SViewNG ?" LINK Commercial_1/Main 0 } @{i}</Commercial>@{ui}


                                @{"Copyright"           LINK Copyright}
                               @{"Disclaimer"           LINK Disclaimer}
                              @{"Distribution"          LINK Distribution}
                            @{"Usage and Notes"         LINK Usage}
                                @{"Problems"            LINK Probs}
                                 @{"Prefs"              LINK Prefs}
                            @{"Correspondence"          LINK Correspondence}
                                 @{"Thanks"             LINK Thanks}
                            @{"Version-History"         LINK History}

@{fg highlight}
                          _ //
                     Only \\X/ Amiga makes it possible!
@{fg text}


                             Please visit:

                            WWW Support Site
                 @{"http://www.amigaworld.com/support/" SYSTEM "AWeb-II:AWeb-II URL http://www.amigaworld.com/support/"} (AWeb-II)


     The CHAOS theory:

     @{i}"Like finding that bloody butterfly whose flapping
      wings cause all these storms we've been having lately
      and getting it to stop."@{ui} (see "Witches Abroad" by Terry Pratchett)


     Ahm...well:

     @{i}...and thanks for all the fish.@{ui}

@ENDNODE

@NODE "Copyright"

The akLJPG.datatype in this version and its documentation files are
(C)opyright 1997 by Andreas R. Kleinert. All rights reserved.

Installer batch file makes use of a special version of Roger Hågensen's
"AmigaT" utility, which has been included with his kind permission.
"akT" may only be used and distributed together with this datatype,
but "AmigaT" is Freely Distributable FreeWare and © Msi Software 1996
(eMail: Msi Software - msi@sn.no, WWW: @{"http://www.sn.no/~msi/" SYSTEM "AWeb-II:AWeb-II URL http://www.sn.no/~msi/"})

Some of the mentioned names or products within this or other
documents may be copyrighted by companies or trademarks of companies
or persons.

Should any of the listed terms and clauses within this document not be
valid in conjunction with the law of certain countries this does not
affect the validity of the other clauses.


The sources are based on the original "ljpgtopnm" utility, which
is available from ftp.cs.cornell.edu in the pub/multimed/ljpg directory,
from where I fetched the "Lossless JPEG Codec (Version 1.0; June 20, 1994)"
by Kongji Huang and Brian Smith, Department of Computer Science, Cornell
University. Precisely, the original sources of the "ljpgtopng" utility,
have been used.

------------------------------------------------------------------------
So, for the LJPEG part, note the following:


This software is based in part on the work of the Independent JPEG Group.

Copyright (c) 1993 Cornell University, Kongji Huang
All rights reserved.

Permission to use, copy, modify, and distribute this software and its
documentation for research purposes, without fee, and without written
agreement is hereby granted, provided that the above copyright notice
and the following two paragraphs appear in all copies of this
software.

IN NO EVENT SHALL THE CORNELL UNIVERSITY BE LIABLE TO ANY PARTY FOR
DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE
UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE.

THE CORNELL UNIVERSITY SPECIFICALLY DISCLAIMS ANY WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE
PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
CALIFORNIA HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES,
ENHANCEMENTS, OR MODIFICATIONS.

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

Copyright (c) 1993 The Regents of the University of California, Brian
C. Smith All rights reserved.

Permission to use, copy, modify, and distribute this software and its
documentation for any purpose, without fee, and without written
agreement is hereby granted, provided that the above copyright notice
and the following two paragraphs appear in all copies of this
software.

IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY
FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.

THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE
PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
CALIFORNIA HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES,
ENHANCEMENTS, OR MODIFICATIONS.

---------------------------------------------------------------------------
IJG Copyright

The authors make NO WARRANTY or representation, either express or
implied, with respect to this software, its quality, accuracy,
merchantability, or fitness for a particular purpose.  This software is
provided "AS IS", and you, its user, assume the entire risk as to its
quality and accuracy.

This software is copyright (C) 1991, 1992, Thomas G. Lane.  All Rights
Reserved except as specified below.

Permission is hereby granted to use, copy, modify, and distribute this
software (or portions thereof) for any purpose, without fee, subject to
these conditions:  (1) If any part of the source code for this software
is distributed, then this README file must be included, with this
copyright and no-warranty notice unaltered; and any additions,
deletions, or changes to the original files must be clearly indicated
in accompanying documentation.  (2) If only executable code is
distributed, then the accompanying documentation must state that "this
software is based in part on the work of the Independent JPEG Group".
(3) Permission for use of this software is granted only if the user
accepts full responsibility for any undesirable consequences; the
authors accept NO LIABILITY for damages of any kind.

Permission is NOT granted for the use of any IJG author's name or
company name in advertising or publicity relating to this software or
products derived from it.  This software may be referred to only as
"the Independent JPEG Group's software".

We specifically permit and encourage the use of this software as the
basis of commercial products, provided that all warranty or liability
claims are assumed by the product vendor.

@ENDNODE

@NODE "Disclaimer"

The author takes no responsibility for any results of the use of this
program.
This software is provided "AS IS" and there is no warranty of any kind,
so that you use this software at your own risk.

The author reserves the right to discontinue development of the program.

@ENDNODE

@NODE "Distribution"

The akLJPG.datatype in this version is freely distributable (FREEWARE).
You may copy it, if the copyright notice is left intact and
all of its parts are included in the distribution.

This program MAY be included in commercial packages or commercial
program collections without my written permission, nevertheless
it must not be sold commercially as a single program.

WHEN being included with commercial or Shareware programs I hereby
demand to receive a free copy of the final program.

This program may be put on public domain disks or included in public
domain disk libraries - when being distributed that way, it is allowed
to take a nominal fee including the costs for copying, without considering
that as "commercial" in the above mentioned sense.

This program may also be distributed via electronic mail and may be
put into mailboxes as long as the redistribution conditions are
respected in all points.

By using or distributing this program you automatically agree to
all of the above conditions and terms.

@ENDNODE

@NODE Usage "Usage and so on"

 Usage
 -----
 Just install the datatype files to their appropriate directories,
 and copy the akLJPGPrefs command to SYS:Prefs/Datatypes (optionally).

 Program information
 -------------------
 It supports reading of LJPG graphics files.
 LJPG is a freely distributable lossless JPEG image compression package.

 There's a port of the encoding program "pnmtoljpg" available on Aminet
 as gfx/pbm/pnmtoljpg.lha, which compresses a Portable Pixmap (PPM, PNM-P6)
 or Portable Graymap image (PGM, PNM-P5) to a lossles JPEG (LJPG) image
 using the JPEG standard (DIS) lossless mode of operation.

 This datatype decodes a ljpg image to either 24 Bit RGB or 256 grayscales
 depending on the number of color components stored in the LJPG image file.

 With V39-V42 picture.datatype it either produces (upto) 256 color
 palette-based or HAM6/8 output (256 colors exported unmodified,
 24 Bit data either dithered or converted to HAM6/HAM8) with
 Ralph Schmidt's picture.datatype V43 24 Bit may be done unmodified
 (the same applies to Picasso96's picture.datatype V43).

 akLJPG.datatype is @{"FREEWARE" LINK "Copyright"}, @{fg highlight}but donations are always welcome@{fg text}.

@ENDNODE

@NODE Probs "Problem fields"

 Crashes ?
 ---------
   The first reason for a crash often is stack size. Not enough stack size.
   IPrefs/WBPatterns has this problem, and others as well.
   Checking this and/or using FastIPrefs (the replacement) is recommended.

 Odd screenmode selection
 ------------------------
   graphics.library's BestModeID function isn't so well designed.
   Try Patching to a better one, e.g. with Aminet:util/sys/ModeP.lha

 Progressbar and programs (esp. Browers)
 ---------------------------------------
   Please note, that the (optional) progress bar will either open
   on a windows's screen as specified via pr_WindowPtr, or on the default
   Public Screen, thus if your favoured Web Browser does not set
   pr_WindowPtr or does not declare its screen as default pub screen,
   that's not my fault. PDTA_Screen will be checked first, as well
   - but usually this won't work at all.

 Unknown datatypes (V43)
 -----------------------
   If your datatypes stop working (unknown file format), please don't
   blame me, but at first check, whether you've still installed an already
   expired beta version of picture.datatype V43...

@ENDNODE

@NODE "Correspondence"

                            WWW Support Site
               @{"http://www.amigaworld.com/support/" SYSTEM "AWeb-II:AWeb-II URL http://www.amigaworld.com/support/"} (AWeb-II)

         (try @{"http://193.203.162.219/" SYSTEM "AWeb-II:AWeb-II URL http://193.203.162.219/"}, if you can't connect)

   _________________________________________________________
  |      You may reach me the following way.                |
  |    Send bug-reports, money or whatever to:              |
  |---------------------------------------------------------|
  |        * SuperView Development & Registration *         |
  |          * DRAFU Development & Registration *           |
  |       * Image Engineer Registration Site Europe *       |
  |                                                         |
  |                                                         |
  |                  PerSuaSiVe SoftWorX                    |
  |                                                         |
  |                  Andreas R. Kleinert                    |
  |                  Sandstrasse 1                          |
  |                  D-57072 Siegen                         |
  |                  Germany, Europe                        |
  |                                                         |
  | Any snail mail to the old address will still be routed. |
  |                                                         |
  |                  Phone:  +49-271-22869 also FAX + AM    |
  |                          +49-271-22838                  |
  |                                                         |
  |                  Weekdays after 17.00h.                 |
  |                                                         |
  |         When calling via phone you may leave a message, |
  |         if I'm not available - but don't expect me      |
  |         calling back to USA, Australia, ... since       |
  |         german phone rates are HIGHLY expensive.        |
  |_________________________________________________________|

  EMail:

        Please send binaries via ARK@News.wwbnet.de, and keep
        them smaller than 16 KB. Please think twice before
        sending them - my postbox is not unlimited in size.

        * Do not send binaries via Fido or Fido-Gates ! *

           - Fido   Andreas Kleinert 2:2457/350.18
           - Usenet
                    ARK@superview.ftn.neckar-alb.de  (Fido-Gate)
                    Andreas_Kleinert@t-online.de     (T-Online)
                    ARK@News.wwbnet.de                (Z-Netz)
                    ARK@amigaworld.com               (AmigaWorld)

           - If nothing else works, try one of these public
             Fido-Usenet gateways:

               In Germany:
                 Andreas_Kleinert@p18.f350.n2457.z2.fido.sub.org

               From USA or elsewhere:
                 Andreas_Kleinert@p18.f350.n2457.z2.fidonet.org

@ENDNODE

@NODE "Thanks"

 Thanks go to (in order of appearance ;-)
 ========================================

  - Jörn Krüger (idea)

   - ...the DOpus team, namely Dr. Greg Perry
   - ...the StormC/Wizard team, namely Jürgen Haage and Markus Nerding
   - ...the Cloanto team
   - ...the people on the DTA (Datatypes) Mailing List on Amiga World
        and the people of the "Datatypes Replacement Project" in general

@ENDNODE

@NODE "Prefs"

  akLJPGPrefs
  -----------
  akLJPGPrefs is the Preferences Program for akLJPG.datatype.

  GUI has been designed with StormWizard 2.0, so this program needs
  "wizard.library" V37+ (you can find a copy in the StormC Demo
  archive or the Wizard Demo package located on Aminet under
  "biz/demo/StormWIZARD1_0.lha").

  Icon by Detlef Winkler (same as SVPrefs.info)

  The global settings will be written to ENV: (and maybe also ENVARC:)
  into a preferences file called "Datatypes/akLJPG.prefs".

  ---------------- task specific settings files -----------------------
  Settings specific to different caller programs may be created
  by copying the global settings from "Datatypes/akLJPG.prefs" to an
  optional task-related prefs file called

            "Datatypes/akLJPG.prefs_Tasks/TaSkNaMe"

  where "TaSkNaMe" means the name of the program as e.g. shown by
  a system monitor (for obvious reasons, this does work best with
  workbench programs, which don't require name patterns as some
  CLI programs might do, like for example "CLI(3):Work:Browsers/XWebber").
  So, with AWeb for example, you would just edit your global settings
  file and then do the following:

    MakeDir ENV:Datatypes/akLJPG.prefs_Tasks
    Copy ENV:Datatypes/akLJPG.prefs ENV:Datatypes/akLJPG.prefs_Tasks/AWebIP"

     [... and the same for ENVARC: ...]

  After that, AWeb will ignore the global settings and fetch its own
  from the given file.
  (Currently you can't edit them locally, sorry - but for e.g. AWeb it
   should be simple to manage that via ARexx by just including an
   appropriate script to AWeb's ARexx menu).
  ---------------------------------------------------------------------


  You can do the following settings:

1) V43_MODE=(NO_DITHERING|V40_DITHERING)
2) V40_24BIT_MODE=(DITHER_ORDERED|HAM_OUTPUT)
3) V40_DEPTH=(3..8)
4) HAM_MODE=(HAM6|HAM8)
5) PROGRESSBAR=(ON|OFF)

  That's mostly self-explaining, but as an example,
  here are the default settings and a short explanation:

V43_MODE=NO_DITHERING
V40_24BIT_MODE=DITHER_ORDERED
V40_DEPTH=8
HAM_MODE=HAM6
INTERLEAVED_BM8=ON
PROGRESSBAR=ON


   General Explanation of Options
   ==============================

1) V43_MODE
------------
  NO_DITHERING:  does output 24 Bit data when running pic-dt V43
  V40_DITHERING: switches to V40 mode settings when running pic-dt V43

2) V40_24BIT_MODE (when running picture datatype V40 or V43 in V40 mode)
-----------------
  DITHER_ORDERED: does ordered dithering of 24 Bit data
  HAM_OUTPUT:     does convert 24 Bit data to HAM6/8 when

3) V40_DEPTH
------------
  When dithering to a palette (so: when in V40 mode and ordered dithering
  being selected) the number of palette colors, which is 256 by default,
  may be reduced here (e.g. on ECS systems).
  Valid depth values are 3..8 (which results in 16..256 colors, easily
  calculated by 2^depth).

4) HAM_MODE
-----------
  HAM6: generates HAM6 output for 24 Bit graphics, when running V39-42
  HAM8: generates HAM8 output for 24 Bit graphics, when running V39-42

    Note, that HAM8 is native to AGA machines and thus may cause
    difficulties with graphic boards and won't work with OCS/ECS Amigas.
    With HAM6 and graphic boards also problems may occur.

5) INTERLEAVED_BM8
------------------
  ON:  will output interleaved bitmaps upto 256 colors
  OFF: will output normal bitmaps (BMF_CLEAR only) - you may
       switch interleaved mode off for specific programs, which
       cannot handle it, or when AllocBitmap() has been patched
       for chunky modes by a graphics card software or e.g. EGSPlus

  Note: There's no need for BMF_DISPLAYABLE, don't rely on it.

6) PROGRESSBAR
--------------
  ON:  pop up percentage display
  OFF: do not pop up percentage display

@ENDNODE

@NODE "History"

 There's a Datatype Developers Mailing List (DTA) running now.
 If you are a datatypes programmer and want to join, please
 contact me for further information or ask info@amigaworld.com (Bodo)


 History
 =======

 V43.60 (20.04.97)  : - in the prefs, "24 Bit" was "Dithering" and vice versa (V43_MODE)
                      - temporary file in T: would not have been deleted
                      - updated email
                      - updated docs

 V43.1 (25.3.97)    : - first version

@ENDNODE
