SPVM-Resource-Libpng

 view release on metacpan or  search on metacpan

.tmp/libpng/contrib/gregbook/README  view on Meta::CPAN

                     ===========================
                      PNG: The Definitive Guide
                     ===========================

                             Source Code

Chapters 13, 14 and 15 of "PNG: The Definitive Guide" discuss three free,
cross-platform demo programs that show how to use the libpng reference
library:  rpng, rpng2 and wpng.  rpng and rpng2 are viewers; the first is
a very simple example that that shows how a standard file-viewer might use
libpng, while the second is designed to process streaming data and shows
how a web browser might be written.  wpng is a simple command-line program
that reads binary PGM and PPM files (the ``raw'' grayscale and RGB subsets
of PBMPLUS/NetPBM) and converts them to PNG.

The source code for all three demo programs currently compiles under
Unix, OpenVMS, and 32-bit Windows.  (Special thanks to Martin Zinser,
zinser at decus.de, for making the necessary changes for OpenVMS and for
providing an appropriate build script.)  Build instructions can be found
below.

.tmp/libpng/pngwrite.c  view on Meta::CPAN

          * higher than all known so far.  Writing the unknown chunks here is
          * most likely to present the chunks in the most convenient order.
          *
          * FUTURE: maybe write chunks in the order the app calls png_set_chnk
          * to give the app control.
          */
         write_unknown_chunks(png_ptr, info_ptr, PNG_HAVE_IHDR);
#endif

#ifdef PNG_WRITE_sBIT_SUPPORTED
         /* PNG v3: a streaming app will need to see this before cICP because
          * the information is helpful in handling HLG encoding (which is
          * natively 10 bits but gets expanded to 16 in PNG.)
          *
          * The app shouldn't care about the order ideally, but it might have
          * no choice.  In PNG v3, apps are allowed to reject PNGs where the
          * APNG chunks are out of order so it behooves libpng to be nice here.
          */
         if ((info_ptr->valid & PNG_INFO_sBIT) != 0)
            png_write_sBIT(png_ptr, &(info_ptr->sig_bit), info_ptr->color_type);
#endif

   /* PNG v3: the July 2004 version of the TR introduced the concept of colour
    * space priority.  As above it therefore behooves libpng to write the colour
    * space chunks in the priority order so that a streaming app need not buffer
    * them.
    */
#ifdef PNG_COLORSPACE_SUPPORTED
#  ifdef PNG_WRITE_cICP_SUPPORTED /* Priority 4 */
   if ((info_ptr->valid & PNG_INFO_cICP) != 0)
      {
         png_write_cICP(png_ptr,
                        info_ptr->cicp_colour_primaries,
                        info_ptr->cicp_transfer_function,
                        info_ptr->cicp_matrix_coefficients,

lib/SPVM/Resource/Libpng.native/src/contrib/gregbook/README  view on Meta::CPAN

                     ===========================
                      PNG: The Definitive Guide
                     ===========================

                             Source Code

Chapters 13, 14 and 15 of "PNG: The Definitive Guide" discuss three free,
cross-platform demo programs that show how to use the libpng reference
library:  rpng, rpng2 and wpng.  rpng and rpng2 are viewers; the first is
a very simple example that that shows how a standard file-viewer might use
libpng, while the second is designed to process streaming data and shows
how a web browser might be written.  wpng is a simple command-line program
that reads binary PGM and PPM files (the ``raw'' grayscale and RGB subsets
of PBMPLUS/NetPBM) and converts them to PNG.

The source code for all three demo programs currently compiles under
Unix, OpenVMS, and 32-bit Windows.  (Special thanks to Martin Zinser,
zinser at decus.de, for making the necessary changes for OpenVMS and for
providing an appropriate build script.)  Build instructions can be found
below.

lib/SPVM/Resource/Libpng.native/src/pngwrite.c  view on Meta::CPAN

          * higher than all known so far.  Writing the unknown chunks here is
          * most likely to present the chunks in the most convenient order.
          *
          * FUTURE: maybe write chunks in the order the app calls png_set_chnk
          * to give the app control.
          */
         write_unknown_chunks(png_ptr, info_ptr, PNG_HAVE_IHDR);
#endif

#ifdef PNG_WRITE_sBIT_SUPPORTED
         /* PNG v3: a streaming app will need to see this before cICP because
          * the information is helpful in handling HLG encoding (which is
          * natively 10 bits but gets expanded to 16 in PNG.)
          *
          * The app shouldn't care about the order ideally, but it might have
          * no choice.  In PNG v3, apps are allowed to reject PNGs where the
          * APNG chunks are out of order so it behooves libpng to be nice here.
          */
         if ((info_ptr->valid & PNG_INFO_sBIT) != 0)
            png_write_sBIT(png_ptr, &(info_ptr->sig_bit), info_ptr->color_type);
#endif

   /* PNG v3: the July 2004 version of the TR introduced the concept of colour
    * space priority.  As above it therefore behooves libpng to write the colour
    * space chunks in the priority order so that a streaming app need not buffer
    * them.
    */
#ifdef PNG_COLORSPACE_SUPPORTED
#  ifdef PNG_WRITE_cICP_SUPPORTED /* Priority 4 */
   if ((info_ptr->valid & PNG_INFO_cICP) != 0)
      {
         png_write_cICP(png_ptr,
                        info_ptr->cicp_colour_primaries,
                        info_ptr->cicp_transfer_function,
                        info_ptr->cicp_matrix_coefficients,



( run in 0.240 second using v1.01-cache-2.11-cpan-4d50c553e7e )