home *** CD-ROM | disk | FTP | other *** search
/ The Best of Mecomp Multimedia 2 / MECOMP-CD-II.iso / amiga / datatypes / gifanim_datatype / gifanim.datatype.doc < prev    next >
Encoding:
Text File  |  1998-05-24  |  30.1 KB  |  776 lines

  1. TABLE OF CONTENTS
  2.  
  3. gifanim.datatype/--datasheed--
  4. gifanim.datatype/--input_format--
  5. gifanim.datatype/ADTM_LOADFRAME
  6. gifanim.datatype/ADTM_UNLOADFRAME
  7. gifanim.datatype/DTM_WRITE
  8. gifanim.datatype/MAIN
  9. gifanim.datatype/OM_DISPOSE
  10. gifanim.datatype/OM_NEW
  11. gifanim.datatype/preferences
  12. gifanim.datatype/--datasheed--                 gifanim.datatype/--datasheed--
  13.  
  14.    NAME
  15.        gifanim.datatype -- data type for GIF Animations
  16.  
  17.    SUPERCLASS
  18.        animation.datatype
  19.  
  20.    DESCRIPTION
  21.        The anim datatype, a sub-class of the animation.datatype, is used to
  22.        load, play and encode (save) GIF animations.
  23.        It supports GIF 87a and GIF 89a compressed animations.
  24.        Using the prefs-file, any sound can be attached to the animation.
  25.  
  26.    METHODS
  27.        OM_NEW -- Create a new animation object from a description file. The
  28.            source may only be a file. Or an empty object can be created for 
  29.            encoding (which must be filled by the application before 
  30.            encoding).
  31.  
  32.        OM_DISPOSE -- Dispose instance and contents (frames, colormaps, sounds
  33.            etc.), then pass msg to superclass
  34.  
  35.        OM_UPDATE -- Perform an ICM_CHECKLOOP check, and if succesfull, the
  36.            method will be executed like OM_SET downstairs.
  37.  
  38.        OM_SET -- Pass msg to superclass and call GM_RENDER if retval from
  39.            superclass was != 0UL.
  40.  
  41.        DTM_WRITE -- Save object's contents in local (GIF Animation) or
  42.            superclass (IFF ILBM) format.
  43.  
  44.        ADTM_LOADFRAME -- Fill in struct adtFrame with requested information
  45.            from internal FrameNode list like bitmap, colormap and sample. If
  46.            the bitmap information is not loaded yet, it will be loaded from
  47.            disk.
  48.  
  49.        ADTM_UNLOADFRAME -- Free resources obtained by ADTM_UNLOADFRAME.
  50.  
  51.        All other methods are passed unchanged to superclass.
  52.  
  53.    ATTRIBUTES
  54.        Following attributes are set by the object and are READ-ONLY for
  55.        applications:
  56.        DTA_ObjName             - file name
  57.        DTA_ObjAnnotation       - set by extension blocks (gif 89a comment
  58.                                  extention)
  59.        DTA_TotalHoriz          - same as ADTA_Width
  60.        DTA_TotalVert           - same as ADTA_Height
  61.        ADTA_Width              - set by GIF screen
  62.        ADTA_Height             - set by GIF screen
  63.        ADTA_Depth              - set by GIF screen
  64.        ADTA_Frames             - number of frames in animation
  65.        ADTA_FramesPerSecond    - fixed to 100 fps
  66.        ADTA_ModeID             - mode id flags
  67.        ADTA_KeyFrame           - Key frame of animation
  68.  
  69.        The following attributes are only set if a sample is attached using 
  70.        the prefs-file:
  71.        ADTA_Sample             - only set to notify the anmation.datatype
  72.                                  instance that the object has sound data
  73.        ADTA_SampleLength       - size of sample data played within one 
  74.                                  timestamp
  75.        ADTA_Period             - sample period
  76.        ADTA_Volume             - volume as set by the prefs-file
  77.  
  78.    BUGS
  79.        * The whole code looks like a big hack; sorry, but this datatype was
  80.          put together within 2 hours...
  81.          ...V1.2 only fixes some bugs and adds a few features.
  82.          ...V1.3 fixed some things, adds some legal stuff and CyberGFX
  83.             support
  84.  
  85.        - Does not support transparency yet (the encoder supports
  86.          transparency througth a prefs-option).
  87.  
  88.        - Very slow playback.
  89.          Reasons:
  90.          - Multiple memory allocations, Seek's and Read's in one
  91.            ADTM_LOADFRAME
  92.          - Unbufferd loading
  93.          - C2P conversion (fast, but not the fastest possible)
  94.          - crap design
  95.          - Slow gif decoder. Rewriting the beast in ASM maybe speed up
  96.            things, but I don't know much about m68k assembler.
  97.            Anybody out there who wants to do the job ?
  98.          ....
  99.  
  100.          To get rid of this problem, the LOADALL switch is set for now.
  101.          On >= mc68060/50MHz, the LOADALL switch in unneccesary, use
  102.          NOLOADALL in this case...
  103.  
  104.        - Some anims get a trashed background, maybe due a bug in the GIF89a
  105.          frame disposal support code.
  106.          Any hint/example animation ?
  107.  
  108.        - This datatype was written for animation.datatype V41. Using this
  109.          datatype with animation.datatype V40.6 does not work !
  110.          Not a bug, but...
  111.  
  112.        - In large videos, the frames at the end will be played slower than
  113.          those at the beginning of the file. This is the result of the
  114.          sequential search internally used (only serious with more than 25000
  115.          frames (mc6030/50mhz)).
  116.          May or may not be fixed.
  117.  
  118.        - CyberGFX support is still under development. It seems that it works
  119.          good, but...
  120.  
  121.        - CyberGFX C2P conversion (LUT8 -> RGB16/24) uses a very crap method
  122.          througth WriteRGBPixel...
  123.  
  124.        - Some GIF89A_DISPOSE_RESTOREPREVIOUS and GIF89A_DISPOSE_NOP seems to 
  125. be not
  126.          handled correctly. 
  127.          But I need more example files to analyse this...
  128.  
  129.    TODO
  130.        - Fixing the bugs above.
  131.  
  132.        - Write the "--input_format--"-Autodoc section.
  133.  
  134.    HISTORY
  135.        V1.1
  136.          Released to the Waldspecht-BBS for testing.
  137.  
  138.        V1.2
  139.          - Found and fixed the longstanding bug that animation.datatype
  140.            V40.7 didn't free some frames. Reason is that ADTM_LOADFRAME
  141.            may be used like "realloc". Now alf_UserData is checked;
  142.            any given frame will be freed (ADTM_UNLOADFRAME).
  143.            Fixed.
  144.  
  145.          - Minor houskeeping changes; removed some unneccesary code.
  146.  
  147.          - Now uses buffered reading (FRead instead of Read and SetVBuf).
  148.            Maybe this speeds up loading a little bit.
  149.  
  150.          - Fixed the bug in NOLOADALL loading mode (dynamic loading of
  151.            frames from disk) that some "disposal" modes (previous image)
  152.            didn't work properly under some conditions.
  153.            Fixed.
  154.  
  155.          - Fixed the bug that animations with a static background were
  156.            not correctly handled in LOADALL mode (I simply forgot
  157.            to write the code...).
  158.            Thanks to Francis Labrie (fb691875@er.uquam.ca) for reporting
  159.            the bug.
  160.            Fixed.
  161.  
  162.          - Fixed the bug that ADTM_LOADFRAME returns evertimes
  163.            ERROR_NO_FREE_STORE on failure instead of returning the real
  164.            cause.
  165.            Also fixed the error handling code in ADTM_LOADFRAME.
  166.            Fixed.
  167.  
  168.          - Implemented a delta mode for WPA8. If possible (e.g. if the
  169.            current frame uses the previous one as it's background), only
  170.            the changed areas are processed by the C2P code.
  171.  
  172.          - Now supports the GIF comment extension. The character set is
  173.            converted automatically, chars > 128 are replaced by '_'
  174.            except the german 'ä', 'ö', 'ü', 'Ä', 'Ö', 'Ü' and 'ß'.
  175.            Multiple comment chunks are merged together.
  176.            The comment will be stored in DTA_ObjAnnotation.
  177.  
  178.          - Cut some unneccesary VERBOSE output.
  179.  
  180.        V1.3
  181.          | Internal testing release to search for the mysterious memory loss
  182.          | in conjunction with the 24BITCHUNKY option.
  183.  
  184.          - Added the notice that UniSys holds the LZW patents in the USA.
  185.  
  186.          - Removed BestModeIDA, because animation.datatype does the same
  187.            thing.
  188.  
  189.          - Small code cleanup.
  190.            Removed some of the debugging code and removed some parts of
  191.            dead code.
  192.  
  193.          - Fixed the "maximum timestamp" (ADTA_Frames) calculation.
  194.            the old way was very crap...
  195.            Fixed.
  196.  
  197.          - Added some padding bytes in the decoder (instance data) part.
  198.            Now the data are aligned, which should speed up the decoding.
  199.  
  200.          - Fixed possible problems when a GIF "Comment Extension" text is
  201.            not '\0'-terminated. Now the load buffer is zero'ed for each new
  202.            cycle.
  203.            Fixed.
  204.  
  205.          - Added some VERBOSE about the "Plain Text Extension". The contents
  206.            are now shown in the verbose output.
  207.  
  208.          - Fixed the bug that in the case that the first frame has no bitmap
  209.            a bitmap with 0,0,0 dimensions would be allocated.
  210.            (Did not occur, but...)
  211.            Fixed.
  212.  
  213.          - Implemented a prefetch buffer for dynamic load mode (e.g.
  214.            NOLOADALL); now all data needed for the frame are loaded with one
  215.            Read statement, all following accesses are redirected to the
  216.            filled buffer.
  217.            Switched from FRead to Read again because we're now loading
  218.            larger blocks.
  219.  
  220.          - Fixed the width padding problem, which caused an ugly border
  221.            filled with rubbish in some anims.
  222.            Fixed.
  223.  
  224.          - Now supports different disposal modes in one animation (each
  225.            frame can have it's own disposal mode).
  226.  
  227.          - Now supports different transarent colors in one animation (each
  228.            frame can have it's own transparent color).
  229.  
  230.          - Removed all references to ADTA_BitMapHeader. It's not required
  231.            for this format.
  232.  
  233.          - Now saves the transparent color values from the previous colormap.
  234.  
  235.          - Fixed the bug that the datatypes creates everytimes a
  236.            palette-per-frame instead of creating them only if neccesary.
  237.            Fixed.
  238.  
  239.          - Now sets the GIF Screen background color to 0 if there is no
  240.            global colormap.
  241.  
  242.          - Added CyberGFX-Support. Upon request, the datatype tries to create
  243.            a 24-bit chunky bitmap if the 24BITCHUNKY prefs switch is set.
  244.            WARNING: Does only work with animation.datatype V41 or higher
  245.            (<= V41.2 had a small bug which has been fixed in V41.3).
  246.  
  247.          - Added CyberGFX bug workaround when BestCModeIDA fails when the
  248.            dimensions given are too small (e.g. 32 * 50 returns INVALID_ID).
  249.            Then 640 * 480 are set.
  250.            Not very nice.
  251.  
  252.          - Added GIF Picture descriptor to replace any version with a wrong
  253.            mask.
  254.  
  255.        V1.4
  256.          - Very much thanks to Frank Mariak (fmariak@chaosengine.ping.de)
  257.            for finding the silly "too big palette"-bug in conjunction
  258.            with the new chunkypixel output.
  259.  
  260.        V1.5
  261.          - Major code cleanup. BOOPSI class structures have been moved
  262.            to classdata.h, class independed functions have been moved
  263.            into misc.c, class preferences to prefs.c
  264.  
  265.          - Replaced the custom stackswapping code with my "standard"
  266.            module "stackswap.c".
  267.  
  268.          - OM_DISPOSE now preserves Result2 (IoErr()).
  269.  
  270.          - Fixed the longstandig bug in ScanFrames that if an OS function
  271.            failed, and IoErr results 0, havoc broke out.
  272.            Fixed.
  273.  
  274.          - ADTA_SampleLength calculations were wrong. The value was got
  275.            from the first frame. Now the value is set correctly to
  276.            alf_SampleLength / (alf_Duration + 1)
  277.            Fixed.
  278.  
  279.          - If a ADTM_LOADFRAME method gets a message from a previous
  280.            ADTM_LOADFRAME call, the contents are freed now after
  281.            the requested data have been loaded. This avoids the
  282.            pathological case that if the same frame should be freed and
  283.            returned the frame IS freed and then re-loaded.
  284.            Now the free of the given frame is done after the loading
  285.            of the requested frame which avoids this inefficienty.
  286.            Fixed.
  287.  
  288.          - Switched truecolor output down to 16 bit (565-bits-per-gun)
  289.            to save some mem...
  290.  
  291.          - Added 16BITCHUNKY, NO16BITCHUNKY, TRUECOLOR and NOTRUECOLOR
  292.            options.
  293.  
  294.          - Fixed ModeID handling. The previous behaviour was that
  295.            a 0 mode id causes the datatype to select it's own mode id.
  296.            But 0 means LORES. Now the default is -1 (which means
  297.            INVALID_ID), which causes the datatype to do it's own
  298.            calculations.
  299.            Fixed.
  300.  
  301.        V1.6
  302.            internal version for testing
  303.  
  304.        V2.1
  305.          - Implemeted the GIF animation encoder part.
  306.            The encoder writes GIF89a animation streams out.
  307.  
  308.          - Fixed a mask bug in the suppied "GIF" descriptor;
  309.            a byte after the "GIF" signature was set to match,
  310.            Fixed.
  311.  
  312.          - gifanim.datatype now requires at least animation.datatype V41
  313.            as base class.
  314.            (mainly to get rid of the V40 workround code which tried to
  315.            get class working with animation.datatype V40).
  316.  
  317.          - Updated and cleaned-up the autodoc a little bit.
  318.  
  319.        V2.2
  320.          - Minor code cleanup
  321.  
  322.          - Removed REPEAT and NOREPEAT options/feature because this
  323.            hack-like "feature" seems to be incompatible to GMultiView's
  324.            repeat option.
  325.            Problem fixed.
  326.  
  327.          - Added encoder prefs options to set GIF interlace mode, transparent
  328.            and background pens.
  329.            See "gifanim.datatype.doc" section "preferences" for details.
  330.            Currently untested...
  331.  
  332.          - Major speedup in the encoder part (~ three times faster).
  333.            a) The encoder now writes any incoming bitmap in an chunkypixel
  334.               array and operates on it instead of doing ReadPixel for
  335.               each pixel.
  336.            b) Minor other changes in the encoder section...
  337.  
  338.          - The decoder now treats 0x00-chars in the chunk id position as 
  339.            padding bytes and does not prompt any sytax error any more.
  340.            Now the "slidbar.gif" created by "GifBuilder 0.2" works...
  341.  
  342.          - Introduced the option STRICTSYNTAX which prints additionally 
  343.            syntax errors (like the 0x00 padding bytes above...).
  344.  
  345.          - Added Installation script "Install DataType".
  346.            It would be very nice if someone has the time to write a
  347.            1:1 CBM Installer version of it...
  348.  
  349.        V2.3
  350.          - Fixed a couple of holes in the descriptor code which may caused
  351.            endless loops or - more worse - crashes in the past.
  352.            Thanks to Guillaume Ubbelohde (950947@mercure.umh.ac.be) for
  353.            reporting the bug.
  354.  
  355.          - The descriptor now checks if the given gif stream is a
  356.            multi-picture gif stream or not, nothing else !
  357.            Syntax checking/version checking etc. is NOT done, this is the
  358.            job of the decoder (e.g. the class library).
  359.  
  360.          - The error checking in the decoder has been improved a little
  361.            bit. Still not perfect, but...
  362.  
  363.          - The decoder now explains most errors in a console window.
  364.  
  365.          - Implemented a NOVERBOSE option (as requested by many people),
  366.            which turns all error messages OFF.
  367.            Be carefull with this option !!!
  368.  
  369.          - Minor code changes and optimisations.
  370.  
  371.    NOTES
  372.        This datatype first scans the whole animation to get index
  373.        information (if the LOADALL switch was set in the prefs-file,
  374.        the entire animation will be loaded), colormaps will be loaded
  375.        immediately.
  376.  
  377.    SEE ALSO
  378.        animation.datatype,
  379.        anim.datatype,
  380.        mpegsystem.datatype, mpegvideo.datatype,
  381.        picmovie.datatype,
  382.        cdxl.datatype, avi.datatype, quicktime.datatype,
  383.        moviesetter.datatype,
  384.        film.datatype,
  385.        directory.datatype,
  386.        markabletextdtclass
  387.  
  388. gifanim.datatype/--input_format--           gifanim.datatype/--input_format--
  389.  
  390.     NAME
  391.         GIF ANIM -- GIF Animation format
  392.  
  393.     DESCRIPTION
  394.         <Not written yet, sorry>
  395.  
  396.     SEE ALSO
  397.         gif.doc, gif89a.doc, compress.gif
  398.  
  399. gifanim.datatype/ADTM_LOADFRAME               gifanim.datatype/ADTM_LOADFRAME
  400.  
  401.     NAME
  402.         ADTM_LOADFRAME -- Load frame
  403.  
  404.     FUNCTION
  405.         The ADTM_LOADFRAME method is used to obtain the bitmap and timing
  406.         data of the animation.
  407.         The given timestamp will be used to find a matching timestamp
  408.         in the internal FrameNode list. If it was found, the corresponding
  409.         timing, bitmap and colormap data are stored into the struct
  410.         adtFrame. If the bitmap wasn't loaded, this method attempts to
  411.         load it from disk.
  412.  
  413.     RESULT
  414.         the bitmap ptr if a bitmap was found,
  415.         0 (and result2 with the reason).
  416.  
  417. gifanim.datatype/ADTM_UNLOADFRAME           gifanim.datatype/ADTM_UNLOADFRAME
  418.  
  419.     NAME
  420.         ADTM_UNLOADFRAME -- Unload frame contents
  421.  
  422.     FUNCTION
  423.         The ADTM_UNLOADFRAME method is used to release the contents of a
  424.         animation frame.
  425.  
  426.         This method frees the bitmap data found in adtFrame.
  427.  
  428.     RESULT
  429.         Returns always 0UL.
  430.  
  431. gifanim.datatype/DTM_WRITE                         gifanim.datatype/DTM_WRITE
  432.  
  433.     NAME
  434.         DTM_WRITE -- Save data
  435.  
  436.     FUNCTION
  437.         This method saves the object's contents to disk.
  438.  
  439.         If dtw_Mode is DTWM_IFF, the method is passed unchanged to the
  440.         superclass, animation.datatype, which writes a single IFF ILBM
  441.         picture.
  442.  
  443.         If dtw_mode is DTWM_RAW, the object saved an GIF Animation stream 
  444.         to the filehandle given, starting with the current frame until
  445.         the end is reached.
  446.         The sequence saved can be controlled by the ADTA_Frame, ADTA_Frames
  447.         and ADTA_FrameIncrement attributes (see TAGS section below).
  448.  
  449.     TAGS
  450.         When writing the local ("raw") format, GIF Animation, the following
  451.         attributes are recognized:
  452.  
  453.         ADTA_Frame (ULONG) - start frame, saving starts here.
  454.             Defaults to the current frame displayed.
  455.  
  456.         ADTA_Frames (ULONG) - the number of frames to be saved,
  457.             Defaults to (max_num_of_frames - curr_frame).
  458.  
  459.         ADTA_FrameIncrement (ULONG) - frame increment when saving.
  460.             Defaults to 1, which means: "jump to next frame".
  461.  
  462.     NOTE
  463.         - Any sound attached to the animation will NOT be saved.
  464.  
  465.         - A CTRL-D signal to the writing process aborts the save.
  466.  
  467.     RESULT
  468.         Returns 0 for failure (IoErr() returns result2), non-zero
  469.         for success.
  470.  
  471. gifanim.datatype/MAIN                                   gifanim.datatype/MAIN
  472.  
  473.     INTRODUCTION
  474.         Datatypes class for GIF animations.
  475.         Based on "giftopnm" by David Koblas, "ppmtogif" by Marcel Wijkstra
  476.         <wijkstra@fwi.uva.nl> and David Rowley <mgardi@watdscu.waterloo.edu>
  477.         and the CBM datatypes example source/ documents written by David
  478.         Junod.
  479.  
  480.     LEGAL
  481.       * Note that this implementation uses LZW, which is PATENTED by UniSys
  482.         in the U.S.A.
  483.  
  484.         Therefore, this application must not be used inside the United
  485.         States of America except for research purposes.
  486.  
  487.       - Compuserves banner:
  488.  
  489.       "The Graphics Interchange Format(c) is the Copyright property of
  490.       CompuServe Incorporated. GIF(sm) is a Service Mark property of
  491.       CompuServe Incorporated."
  492.  
  493.       - "giftopnm" legal info:
  494.       +-------------------------------------------------------------------+
  495.       | Copyright 1990, 1991, 1993, David Koblas.  (koblas@netcom.com)    |
  496.       |   Permission to use, copy, modify, and distribute this software   |
  497.       |   and its documentation for any purpose and without fee is hereby |
  498.       |   granted, provided that the above copyright notice appear in all |
  499.       |   copies and that both that copyright notice and this permission  |
  500.       |   notice appear in supporting documentation.  This software is    |
  501.       |   provided "as is" without express or implied warranty.           |
  502.       +-------------------------------------------------------------------+
  503.  
  504.     REQUIREMENTS
  505.         - You need at least Kick/WB 3.0.
  506.           | Many people wrote me that they cannot find an
  507.           | "animation.datatype" class.
  508.           | Only the 3.1 release contains it. (Subclasses of)
  509.           | animation.datatype can run under 3.0.
  510.  
  511.         - "datatypes/animation.datatype", >= V41
  512.           "animation.datatype V41" requires itself some
  513.           libraries/boopsi classes:
  514.         - "realtime.library", >= V39              - for timing
  515.         - "gadgets/tapedeck.gadget" (any version) - for the controls
  516.  
  517.            If you want to attach samples, you need "sound.datatype" >= V39
  518.            and your prefereed subclass (8svx.datatype for IFF 8SVX samples
  519.            etc.).
  520.  
  521.     USAGE
  522.         If the datatypes descriptor file was activated, any attempt to load
  523.         a GIF anim stream using GMultiView, MultiView, AmigaGuide or
  524.         SwitchWindow will load and play the animation. If the source was a
  525.         file, gifanim.datatype loads frames dynamically from disk.
  526.  
  527.         If you want to save the current animation in gifanim.datatype's
  528.         local format, use MultiView's "Project/Save As..." menu (or
  529.         GMultiView's "Project/Save As Raw...").
  530.         gifanim.datatype saves the current animation, starting with the
  531.         current frame as GIF animation.
  532.  
  533.         If you want to attach samples to the animation, you must edit the
  534.         prefs file (ENV:Classes/DataTypes/gifanim.prefs) and add the
  535.         following line:
  536.         VERBOSE SAMPLE="ram:have_a_nice_day.8svx"
  537.         Which loads and attaches the sample "ram:have_a_nice_day.8svx" to
  538.         the animation. See gifanim.datatype.doc/preferences for a complete
  539.         description of the prefs file.
  540.  
  541.     INSTALLATION
  542.         After unpacking this archive:
  543.         Because this version does not include an Installer script, you have
  544.         to do the installation manually through the shell:
  545.  
  546.           - Unpack this archive and copy the "gifanim.datatype" to
  547.             SYS:Classes/DataTypes/:
  548.  
  549.         Copy CLONE FROM "gifanim.datatype" TO
  550.          "SYS:Classes/DataTypes/gifanim.datatype"
  551.  
  552.           - Then copy the datatypes descriptor into the DEVS:DataTypes
  553.             directory.
  554.             If the descriptor already exists, you should not replace it,
  555.             otherwise you may loose "toolnodes" and other settings stored in
  556.             the existing descriptor.
  557.  
  558.      Copy CLONE FROM "GIFANIM(%|.info)" TO DEVS:Datatypes/
  559.  
  560.     SOURCE
  561.         Source is included as an example how to write an
  562.         animation.datatype subclass which deals with things chunky bitmaps
  563.         deltas and an encoder...
  564.  
  565.     AUTHOR
  566.         If you want to blame me, report any bugs, or wants a new version
  567.         send your letter to:
  568.                         Roland Mainz
  569.                         Hohenstaufenstraße 8
  570.                         52388 Nörvenich
  571.                         GERMANY
  572.  
  573.         Phone: (+49)(0)2426/901568
  574.         Fax:   (+49)(0)2426/901569
  575.  
  576.         EMAIL is also available (if you want to send me attachments
  577.         larger than 1MB (up to 5MB, more with my permission):
  578.  
  579.         GISBURN@w-specht.rhein-ruhr.de
  580.  
  581.         Up to July 1998 I'm reachable using this email address, too:
  582.         Reinhold.A.Mainz@KBV.DE
  583.  
  584.         | Please put your name and address in your mails !
  585.         | German mailers should add their phone numbers.
  586.         | See BUGS section above when submitting bug reports.
  587.  
  588.         Sorry, but I can only look once a week for mails.
  589.         If you don't hear something from me within three weeks, please
  590.         send your mail again (but watch about new releases) (problems with
  591.         this email port are caused by reconfigurations, hackers, network
  592.         problems etc.).
  593.  
  594.         The  entire  "gifanim.datatype"  package  may  be  noncommercially
  595.         redistributed, provided  that  the package  is always  distributed
  596.         in it's complete  form (including it's documentation). A small
  597.         copy fee  for media costs is okay but any kind of commercial
  598.         distribution is strictly forbidden without my permission !
  599.         Comments and suggestions how to improve this program are
  600.         generally appreciated!
  601.  
  602.         Thanks to David Junod, who wrote the animation.datatype and lots of
  603.         the datatypes example code, David Koblas for his "giftopnm"
  604.         and other people for their compression formats, Peter McGavin for
  605.         his C2P function, Matt Dillon for his DICE, Olaf 'Olsen' Barthel
  606.         for his help, ideas and some text clips from his documentations.
  607.  
  608. gifanim.datatype/OM_DISPOSE                       gifanim.datatype/OM_DISPOSE
  609.  
  610.     NAME
  611.         OM_DISPOSE -- Delete a gifanim.datatype object.
  612.  
  613.     FUNCTION
  614.         The OM_DISPOSE method is used to delete an instance of the
  615.         gifanim.datatype class. This method is passed to the superclass when
  616.         it has completed.
  617.         This method frees all frame nodes and their contents (bitmaps,
  618.         colormaps, samples etc.)
  619.  
  620.     RESULT
  621.         The object is deleted. 0UL is returned.
  622.  
  623. gifanim.datatype/OM_NEW                               gifanim.datatype/OM_NEW
  624.  
  625.     NAME
  626.         OM_NEW -- Create a gifanim.datatype object.
  627.  
  628.     FUNCTION
  629.         The OM_NEW method is used to create an instance of the
  630.         gifanim.datatype class.  This method is passed to the superclass
  631.         first. After this, gifanim.datatype parses the prefs file and makes
  632.         a scan through the data to get index information. Frame bitmaps are
  633.         loaded if the input stream isn't seekable, colormaps and the first
  634.         frame are loaded immediately.
  635.         If a sample was set in the prefs, it will be loaded and attached
  636.         to the animation.
  637.  
  638.     ATTRIBUTES
  639.         The following attributes can be specified at creation time.
  640.  
  641.         DTA_SourceType (ULONG) -- Determinates the type of DTA_Handle
  642.             attribute. Only DTST_FILE and DTST_RAM are supported.
  643.             If any other type was set in a given DTA_SourceType,
  644.             OM_NEW will be rejected.
  645.             Defaults to DTST_FILE.
  646.  
  647.         DTA_Handle -- For DTST_FILE, a BPTR filehandle is expected. This
  648.             handle will be created by datatypesclass depeding on the DTF_#?
  649.             flag, which is DTF_BINARY here.  DTST_FILE, datatypesclass
  650.             creates a file handle from the given DTA_Name and DTA_Handle
  651.             (a BPTR returned by Lock).
  652.             A DTST_RAM (create empty object) source type requires a NULL
  653.             handle.
  654.  
  655.     RESULT
  656.         If the object was created a pointer to the object is returned,
  657.         otherwise NULL is returned.
  658.  
  659. gifanim.datatype/preferences                     gifanim.datatype/preferences
  660.  
  661.    NAME
  662.        preferences
  663.  
  664.    DESCRIPTION
  665.        The "ENV:Classes/DataTypes/gifanim.prefs" file contains global
  666.        settings for the datatype.
  667.        The preferences file is an ASCII file containing one line where the
  668.        preferences can be set.
  669.        It can be superset by a local variable with the same name.
  670.  
  671.        Each line can contain settings, special settings for some projects
  672.        can be set using the MATCHPROJECT option.
  673.        Lines beginning with a '#' or ';' chars are treated as comments.
  674.        Lines are limitted to 256 chars.
  675.  
  676.    TEMPLATE
  677.        MATCHPROJECT/K,VERBOSE/S,NOVERBOSE/S,STRICTSYNTAX/S,NOSTRICTSYNTAX/S,
  678.        MODEID/K/N,16BITCHUNKY=24BITCHUNKY=TRUECOLOR/S,
  679.        NO16BITCHUNKY=NO24BITCHUNKY=NOTRUECOLOR/S,FPS/K/N,
  680.        SAMPLE/K,SAMPLESPERFRAME=SPF/K/N,VOLUME/K/N,LOADALL/S,
  681.        NOLOADALL/S,ENC_INTERLACE/S,ENC_NO_INTERLACE/S,
  682.        ENC_BACKGROUNDPEN=ENC_BG/K/N,ENC_TRANSPARENTPEN=ENC_TRANSPARENT/K/N
  683.  
  684.        MATCHPROJECT -- The settings in this line belongs only to this
  685.            project(s), e.g. if the case-insensitive pattern does not match,
  686.            this line is ignored.
  687.            The maximum length of the pattern is 128 chars.
  688.            Defaults to #?, which matches any project.
  689.  
  690.        VERBOSE -- Print information about the animation. Currently
  691.           the frame numbers and the used compression are printed, after all
  692.           number of scanned/loaded frames, set FPS rate, dimensions (width/
  693.           height/depth), sample information etc.
  694.  
  695.        NOVERBOSE -- Turns verbose output and error messages OFF.
  696.           Be carefull, you won't see any error messages any more !!!
  697.  
  698.        STRICTSYNTAX -- Prompt syntax errors in the gif streams.
  699.  
  700.        NOSTRICTSYNTAX -- Turns STRICTSYNTAX off
  701.  
  702.        MODEID -- Select screen mode id of datatype (will be stored in
  703.            ADTA_ModeID). Note that the DOS ReadArgs function used for parsing
  704.            fetches a SIGNED long. The bit 31 will be represented by minus
  705.            '-'. (example: "MODEID=266240" sets the mode to the A2024 screen
  706.            mode id)
  707.            Defaults to -1, which means: Use the best screenmode available for
  708.            the given width, height and depth.
  709.  
  710.        16BITCHUNKY
  711.        24BITCHUNKY
  712.        TRUECOLOR -- Create 24 bit chunky bitmaps, if possible.
  713.            Note that the 16BITCHUNKY and the 24BITCHUNKY options will be
  714.            seperated in the future. The TRUECOLOR option selects the
  715.            best truecolor depth in this case...
  716.  
  717.        NO16BITCHUNKY
  718.        NO24BITCHUNKY
  719.        NOTRUECOLOR -- Turns 24BITCHUNKY option off. (Default)
  720.            Note that the 16BITCHUNKY and the 24BITCHUNKY options will be
  721.            seperated in the future. The TRUECOLOR option selects the
  722.            best truecolor depth in this case...
  723.  
  724.        FPS -- Frames Per Second
  725.            A value of 0 here means: Use default FPS.
  726.  
  727.        SAMPLE -- Attach the given sample to the animation. The sample will
  728.            be loaded using datatypes (GID_SOUND).
  729.            Only one sample can be attached to one animation stream, any
  730.            following attempt to attach a sample will be ignored.
  731.  
  732.        SAMPLESPERFRAME -- Set samples per frame rate for sound. This
  733.            overrides the own internal calculations to get rid of rounding
  734.            errors.
  735.  
  736.        VOLUME -- Volume of the sound when playing.
  737.            Defaults to 64, which is the maximum. A value greater than 64 will
  738.            be set to 64.
  739.  
  740.        LOADALL -- Load all frames into memory.
  741.  
  742.        NOLOADALL -- Turns off the LOADALL flag, which may be set in a prefs-
  743.            line before. This switch is set per default, and can be turned off
  744.            by the LOADALL option, later it can be turned on again by this
  745.            option.
  746.  
  747.        Encoder related options:
  748.        ENC_INTERLACE    - create interlaced gif animation
  749.  
  750.        ENC_NO_INTERLACE - create non-interlaced gif animation 
  751.            (set per default).
  752.  
  753.        ENC_BACKGROUNDPEN
  754.        ENC_BG           - background pen number
  755.            Defaults to 0 (e.g. default bg pen)
  756.  
  757.        ENC_TRANSPARENTPEN
  758.        ENC_TRANSPARENT - transparent pen number
  759.            Defaults to -1 (means: no transparent pen).
  760.  
  761.  
  762.    NOTE
  763.        - An invalid prefs file line will be ignored and forces the VERBOSE
  764.          output.
  765.  
  766.    BUGS
  767.        - Low memory may cause that the prefs file won't be parsed.
  768.  
  769.        - Lines are limitted to 256 chars
  770.  
  771.        - An invalid prefs file line will be ignored.
  772.  
  773.        - The sample path length is limitted to 200 chars. A larger
  774.          value may crash the machine if an error occurs.
  775.  
  776.