Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Commits on Oct 10, 2011
  1. Merge the I/O buffering branch

    commit 1d817f4
    Author: Tony Cook <>
    Date:   Mon Oct 10 18:07:12 2011 +1100
        move changes into release area
    commit a0392ff
    Author: Tony Cook <>
    Date:   Sat Oct 8 13:37:10 2011 +1100
        bump API revision level and note the cause (in a comment)
    commit fdbad1c
    Author: Tony Cook <>
    Date:   Sat Oct 8 12:36:44 2011 +1100
        fill out changes some more
    commit b54571f
    Author: Tony Cook <>
    Date:   Sat Oct 8 12:15:05 2011 +1100
        document io_new_cb() callbacks a little + some cleanup
    commit a5504e7
    Author: Tony Cook <>
    Date:   Sat Oct 8 11:53:17 2011 +1100
        make new I/O layer object constructors and document them
    commit c631d25
    Author: Tony Cook <>
    Date:   Sat Oct 8 00:14:07 2011 +1100
        document most I/O layer functions, export the io_glue constructors
    commit 1d7d283
    Author: Tony Cook <>
    Date:   Thu Oct 6 18:59:49 2011 +1100
        make sure we read bytes for callback IO objects
    commit 2aacacb
    Author: Tony Cook <>
    Date:   Thu Oct 6 17:00:35 2011 +1100
        document io_new_cb perl callbacks, buffered parameter and some cleanup
    commit b1cb9fb
    Author: Tony Cook <>
    Date:   Mon Oct 3 16:36:58 2011 +1100
        add Imager::IO pod coverage tests + add method docs
    commit dd20383
    Author: Tony Cook <>
    Date:   Mon Oct 3 12:31:29 2011 +1100
        move internals to the end of iolayer.c
    commit 4692ab9
    Author: Tony Cook <>
    Date:   Mon Oct 3 11:58:35 2011 +1100
        clean up unneeded structures
    commit b179462
    Author: Tony Cook <>
    Date:   Fri Sep 30 23:36:41 2011 +1000
        fail flush if error is set
    commit 0db35f7
    Author: Tony Cook <>
    Date:   Tue Sep 27 00:08:11 2011 +1000
        add i_io_gets()
    commit f1d7a30
    Author: Tony Cook <>
    Date:   Mon Sep 26 23:18:20 2011 +1000
        remove more unused code, including unused variables
    commit 9d4eea2
    Author: Tony Cook <>
    Date:   Mon Sep 26 21:46:29 2011 +1000
        final coverage tests
    commit 28a5ceb
    Author: Tony Cook <>
    Date:   Thu Sep 22 22:36:01 2011 +1000
        WIP, more coverage and fixes
    commit 5a42692
    Author: Tony Cook <>
    Date:   Thu Sep 22 22:35:43 2011 +1000
        we almost always want symbols with our coverage, so enable them
    commit 7cfdd0c
    Author: Tony Cook <>
    Date:   Thu Sep 22 22:35:07 2011 +1000
        actually store the character in the i_io_putc() macro
    commit 676e43d
    Author: Tony Cook <>
    Date:   Thu Sep 22 22:32:42 2011 +1000
        remove the 0 size check, since i_io_peekn() itself does the check
        This ensures we can test the underlying function's behaviour
    commit 6175b9e
    Author: Tony Cook <>
    Date:   Thu Sep 22 22:30:56 2011 +1000
        make i_io_set_buffered() into a real function
        since it needs to flush
    commit 3fc2c65
    Author: Tony Cook <>
    Date:   Sat Sep 17 15:06:27 2011 +1000
        more coverage, some fixes, still WIP
    commit ddb433c
    Author: Tony Cook <>
    Date:   Sat Sep 17 13:16:00 2011 +1000
        improve i_io_peekn() / i_io_read_fill() interaction
        a peekn() for a small amount no longer limits a following peekn() for
        a larger amount
        it also handles partly consumed input buffers
    commit 830b5c6
    Author: Tony Cook <>
    Date:   Sat Sep 17 00:24:55 2011 +1000
        WIP, working on coverage tests
    commit 1987245
    Author: Tony Cook <>
    Date:   Wed Sep 14 20:47:49 2011 +1000
        update iobuf todos
    commit 2dbbb48
    Author: Tony Cook <>
    Date:   Tue Sep 13 11:28:36 2011 +1000
        make the error message checks unbuffered, update the grey32 test image
        since test_image_double() has changed
    commit 84dc488
    Author: Tony Cook <>
    Date:   Tue Sep 13 11:28:24 2011 +1000
        improve error checking a bit
    commit 6173406
    Author: Tony Cook <>
    Date:   Mon Sep 12 22:37:42 2011 +1000
        WIP commit
    commit 342167b
    Author: Tony Cook <>
    Date:   Sat Sep 10 15:07:00 2011 +1000
        remove buffering from the PNM reader
    commit 8c2fe37
    Author: Tony Cook <>
    Date:   Sat Sep 10 14:00:10 2011 +1000
        remove buffering from the callback IO object implementation
           - the callback IO object did its own buffering, controlled by the
             maxbuffer parameter supplied to the read() and write() methods.
             This buffering has been removed, to avoid redundancy with the
             common io_glue buffering.
           - the callback IO object new tests the result of calling the close
             callback, which should return true for success.
    commit 2ffd623
    Author: Tony Cook <>
    Date:   Sat Sep 10 13:13:46 2011 +1000
        change notes + todo for the iobuf changes
    commit dce56aa
    Author: Tony Cook <>
    Date:   Sat Sep 10 00:01:23 2011 +1000
        buffering working
        - some file handlers don't check the result of i_io_close(), test that
          (with a close callback handler), fix that
        - remove other buffering implementations where possible, the callback
          code (Imager.xs) and pnm.c in particular
        - allow _get_writer() to produce unbuffered writers
        - add coverage tests for the buffering code
    commit d45c629
    Author: Tony Cook <>
    Date:   Tue Aug 30 00:15:12 2011 +1000
        reorganize the io_glue types for the upcoming buffering changes
    commit e080fa6
    Author: Tony Cook <>
    Date:   Tue Aug 30 00:14:26 2011 +1000
        eliminate the final remnants of io_glue_commit_types()
        it's not part of the API and has been a no-op for years
Commits on Aug 8, 2011
  1. switch to using size_t and i_img_dim strictly

    Also, use double instead of float where the value is used in
    calculating a co-ordinate, since float may not be able to represent an
    image ordinate with sufficient precision
Commits on Jun 8, 2011
  1. replace (imager|tony) with

    I plan to stop receiving mail on eventually.  Give
    myself a smaller attack surface for spammers.
Commits on Jul 3, 2010
  1. reading multi-image PNM files

    Tony Cook authored
    Note: this can accept invalid PNM files
    Supplied by Philip Gwyn (Leolo)
Commits on Apr 7, 2008
  1. warning clean up - clean up unusued variables, fix some const

    Tony Cook authored
    removed some #if 0 code
Commits on Apr 1, 2008
  1. add i_gsamp_bg/i_gsampf_bg functions, sample based versions of

    Tony Cook authored
    revert the pnm/jpeg writing code to closer to the older version, using
    i_gsamp_bg() to avoid the extra steps
  2. - writing a 2 or 4 channel image to a PGM/PPM will now write that

    Tony Cook authored
       image as if composited against a background, black by default,
       overridable with the i_background tag/parameter.
Commits on Jan 30, 2007
Commits on Dec 30, 2006
  1. Various changes:

    Tony Cook authored
     - fix drawing text on 2/4 channel images for FT2
     - reading ASCII PBMs was broken, it assumed there was whitespace 
       between samples but there doesn't need to be
     - add makemap type of mono/monochrome for producing monochrome images
     - roughly tripled speed of reading any sort of PNM
     - reading a pnm can now return a partial image if you set allow_partial
     - reading a bmp can now return a partial image if you set allow_partial
     - we can now read 16-bit/sample binary PGM/PPM images
     - we can now write 16-bit/sample binary PGM/PPM files if explicitly 
       requested (since GIMP can't read them)
     - reading a tiff will now only return an incomplete image if you set 
     - some documentation reformatting
Commits on Jan 10, 2006
  1. - start of external Imager API access:

    Tony Cook authored
      - rename headers to avoid conflicts:
        - image.h to imager.h
        - imagei.h to imageri.h
        - datatypes.h to imdatatypes.h
        - config.h to imconfig.h (created by Makefile.PL)
      - moved all public types defined in imager.h to imdatatypes.h
      - supply the PM parameter to WriteMakefile(), to install headers 
        under Imager/include, and the Imager typemap in Imager/typemap.
        We scan the MANIFEST for files to add to PM.
      - add "i_" prefix on some functions useful as public at the C level.
      - moved the typedefs that support the typemap from Imager.xs to 
      - set the global callbacks hook in the Imager.xs BOOT section
      - API cleanup:
        - define i_tags_set(), i_tags_setn() - we might not allow multiple 
          values for a tag in the future
        - i_copy() now returns a new image instead of doing horrible inplace
          things to an existing image
        - provide actual functions for all of the macros we define in imager.h
          so we can put them in the global callbacks structure
      - define global functions structure (imexttypes.h)
        and initialize it (imext.c)
      - add API include header with macros to setup the define and
        initialize the local callbacks pointer, and macros to call the API
      - build Imager::APIRef from C sources, including updating the sources
        to include documentation for each API function.
      - convert dyntest and mandelbrot dynfilts into XS modules (too easy)
      - simple Imager::CountColor example
    - support Inline::C :
      - typemap changes to accept Imager or Imager::ImgRaw objects as 
        image parameters
      - define Imager output type for trivial cases of returning an i_img as
        a full Imager object
      - Inline WITH hook to filter Imager XS types into types Inline::C can
        accept, supply appropriate headers and initialization.
      - test script t/t82inline.t
    - try to use XSLoader instead of DynaLoader (but fallback if necessary)
    - paste() can now paste a subset of the source image.
    - paste() now has better tests
    - paste() should now be faster for larger pastes
Commits on Aug 24, 2005
  1. - convert t/t107bmp.t to Test::More

    Tony Cook authored
    - convert t/t108tga.t to Test::More
    - error messages generated reading JPEG or PNG images are now
      available via errstr()
    - implement/test/document set_file_limits()/get_file_limits() methods,
      which allow limits on the size of image files read.
Commits on Feb 10, 2005
  1. fix some function headers, removed some junk code

    Tony Cook authored
Commits on Jan 24, 2005
  1. - eliminate unused variables and static functions

    Tony Cook authored
    - simplify some XS code by adding another typemap entry
Commits on Nov 29, 2004
Commits on Oct 25, 2004
  1. - renamed io.h to imio.h to prevent problems building under cygwin.

    Tony Cook authored
    - i_writegif_low() wasn't setting the returned global palette, which
      meant a rubbish palette was returned to the user (detected with valgrind)
Commits on Aug 26, 2004
  1. - the pnm reader read maxval for ppm/pgm files and then ignored it,

    Tony Cook authored
              it's now validated (0 < maxval < 65536) and used to scale
              samples.  Note that binary ppm/pgm files (P6/P5) with maxval >
              255 result in an error, since I didn't want to add new features
              just yet, just get the code that's there working correctly.
              Thanks to Elthek on rhizo for reporting this and help in
              tracking it down.
            - added a bunch of tests for reading pnm files.
Commits on Jan 7, 2002
  1. ascii pbms weren't treated correctly

    Tony Cook authored
Commits on Jan 4, 2002
  1. enhanced iolayer

    Tony Cook authored
    multi image/file tiff support
Commits on Nov 19, 2001
  1. move the combining function call outside the general fills (simplifies

    Tony Cook authored
    the fills)
    implement general fills for anti-aliased polygons
Commits on Oct 28, 2001
  1. Fixed i_transform2() so malloc(0) doesn't happen. Also corrected pod …

    Arnar Mar Hrafnkelsson authored
    …errors and
    added author sections to all .c files.
Commits on Oct 27, 2001
  1. Added casts for pointer assignments in pnm.c. Removed old stale code …

    Arnar Mar Hrafnkelsson authored
Commits on Oct 23, 2001
  1. Cleaned up io.h, io.c which had functions not used any more, removed …

    Arnar Mar Hrafnkelsson authored
    and dated code from pnm.c.  Moved functions specific to raw images to raw.c
    from io.c
Commits on Aug 13, 2001
  1. Egads

    Tony Cook authored
    Merged in the exp_represent branch
    Should have done this earlier
Commits on Jun 6, 2001
  1. Removed i_writeppm and put in i_writeppm_wiol instead.

    Arnar Mar Hrafnkelsson authored
Commits on May 10, 2001
  1. support saving to pgm file

    Tony Cook authored
Commits on Apr 12, 2001
  1. I'm suprised the errno.h is needed, but here it is

    Tony Cook authored
Commits on Apr 10, 2001
  1. added error reporting code

    Tony Cook authored
Commits on Mar 25, 2001
  1. Initial revision

    Arnar Mar Hrafnkelsson authored
Something went wrong with that request. Please try again.