Permalink
Commits on Jan 18, 2012
  1. PNG input conversion rewrite for better transparency/alpha support.

    There are two possible representations of transparency in PNG files:
    alpha channel for :truecolor-alpha and :greyscale-alpha colour types,
    and a separate transparency map in a tRNS ancillary chunk. PNG-READ
    retains the difference by keeping data from tRNS as a separate
    TRANSPARENCY property of png-state.
    
    New version of OPTICL:READ-PNG-STREAM uses transparency data for
    OPTICL alpha channel when reading a PNG with no "native" alpha channel
    implied by colour-type. Additionally, as OPTICL has no equivalent for
    :greyscale-alpha, greyscale images with (any kind of) transparency
    data are converted to RGBA.
    
    Due to a bug in PNG-READ (fix committed on pull request
    <Ramarren/png-read#3>), PNG-READ::TRANPARENCY
    property contained a raw representation of tRNS ancillary chunk
    instead of 2D 8-bit transparency data (that's how it was intended to
    work). A workaround for unfixed PNG-READ was added to this version of
    OPTICL:READ-PNG-STREAM: If TRANSPARENCY is not a 2D-array, its content
    is ignored (as if there were no alpha channel). Warning or error could
    be more appropriate here.
    
    Turning :greyscale-alpha colour type to RGBA is an example of new use
    cases supported by rewritten READ-PNG-STREAM, even with older
    PNG-READ.
    committed Jan 18, 2012
Commits on Nov 20, 2011
  1. add eval-when (:compile-toplevel :load-toplevel :execute) around (req…

    …uire :sb-cltl2) which fixes compilation on recent SBCLs.
    slyrus committed Nov 20, 2011
Commits on May 18, 2011
  1. more indentation fixes

    slyrus committed May 18, 2011
  2. indentation changes

    slyrus committed May 18, 2011
Commits on May 4, 2011
Commits on Apr 28, 2011
  1. Merged pull request #1 from ichernetsky/master.

    Merge thresholding patch from Ivan Chernetsky.
    slyrus committed Apr 28, 2011
Commits on Apr 9, 2011
Commits on Apr 7, 2011
Commits on Mar 28, 2011
  1. fix array declaration: (type (simple-array fixnum *) counts) -> (type…

    … (simple-array fixnum (*)) counts)
    slyrus committed Mar 28, 2011
Commits on Mar 26, 2011
  1. clean up affine-transformation stuff a bit

     * remove unused %transform-coord
    
     * rename %fast-transform-image to %fast-affine-transform-image
    
     * rename %transform-image to %affine-transform-image
    
     * remove commented out code path for transform-cood
    
     * wrap long lines
    slyrus committed Mar 26, 2011
Commits on Mar 25, 2011
  1. minor tweaks (replace incf with setf, reorder for clauses in loop) to…

    … silence SBCL's compiler notes
    slyrus committed Mar 25, 2011
  2. once again clean up the type system, this time getting rid of the red…

    …undant and slightly-misleading (but, thankfully, not exported) integer-image and float-image
    slyrus committed Mar 25, 2011
  3. add %get-array-dimensions-from-type-decl to deal with implementation-…

    …specific differences in how type declarations are dealt with. also, cleaner evaluation of check for channels and that channels is > 1 in the image constructor function template.
    slyrus committed Mar 25, 2011
  4. wrap color export in an eval-when :compile-toplevel :load-toplevel :e…

    …xecute. Thanks to Utz-Uwe Haus for the patch.
    slyrus committed Mar 25, 2011
Commits on Mar 24, 2011
  1. rework single-float and double-float image types by adding a float-im…

    …age type and using this with :element-type as appropriate
    slyrus committed Mar 24, 2011
Commits on Mar 23, 2011
  1. add fast discrete-convolve routines for 8- and 16-bit gray, 16-bit rg…

    …b, and 8- and 16-bit rgba
    slyrus committed Mar 23, 2011
  2. use modular arithmetic for loop indices to quiet the compiler, make *…

    …sharpen-kernel* be of element-type 'double-float
    slyrus committed Mar 23, 2011
  3. add fast discrete-convolve for 8-bit-rgb-array convolved with a doubl…

    …e-float array, add &key element-type arg to normalize-array
    slyrus committed Mar 23, 2011
  4. add a force-simple arg to map-array so that we can get simple arrays …

    …back from things like normalize.
    slyrus committed Mar 23, 2011
Commits on Mar 22, 2011
  1. Improvements of compute-histogram and threshold-image-with-min-error

     * compute-histogram now uses double-float instead of single-float
     * both are with docstrings
     * threshold-image-with-min-error signals a type if an image of
       unsupported type was passed
     * several numeric bugs were fixed
    ichernetsky committed Mar 22, 2011
Commits on Mar 21, 2011
  1. Improved threshold-image function.

     * Documentation added.
     * Signals error of type-error if non-grayscale image is passed.
     * threshold is coerced to type of image's elements
    ichernetsky committed Mar 21, 2011
  2. Draft implementation of "Minimum Error Thresholding" by J. Kittler an…

    …d J. Illingworth
    
    Though, somewhat buggy (for example, DIVISION-BY-ZERO happens sometimes), but still useful. It will be improved very soon.
    ichernetsky committed Mar 21, 2011