GithubHelp home page GithubHelp logo

ljosa / cl-png Goto Github PK

View Code? Open in Web Editor NEW
19.0 19.0 10.0 14.64 MB

Common Lisp library for reading and writing PNG files

License: GNU Lesser General Public License v2.1

C 7.44% Common Lisp 92.33% Shell 0.23%

cl-png's People

Contributors

andrewberkley avatar ljosa avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

cl-png's Issues

memory corruption loading files from pngsuite

http://www.schaik.com/pngsuite/tbbn0g04.png gets an alpha channel due to (png-set-expand png-ptr), but only 1 channel is allocated in the make-image call, so png-read-image writes past the end of the array.

Also, depending on options and file, both png-set-expand and png-set-strip-alpha are called, and the docs say

If you specify a contradictory set of transformations, for example both adding and removing the alpha channel, you cannot predict the final result.

The call to make-array to make-sharable-array on Lispworks in broken.

(apply #'make-array

It currentll passes the :allocation :static kwyord before the arguments, including the dimensions required argument. That is the wrong syntax, the required argumnet must come first. I fixed it in my copy by chaging to:

(apply #'make-array
         (car args)
	 #+(or lispworks allegro) :allocation
	 #+lispworks :static #+allegro :static-reclaimable
	 (cdr args))

That is working on LispWorks. Probably on Allegro too, but I didn't check.

Found by running the tests of the quicklisp system "dataloader.test".

Some systems failed to build for Quicklisp dist

Building with SBCL 2.1.6 / ASDF 3.3.1 for quicklisp dist creation.

Trying to build commit id 11b965f

bmp-test fails to build because of a failure in png.

image-test fails to build because of a failure in png.

ops-test fails to build because of a failure in png.

png-test fails to build because of a failure in png.

png fails to build with the following error:

; caught ERROR:
;   READ error during COMPILE-FILE: Symbol "%ARRAY-DATA-VECTOR" not found in the SB-KERNEL package. Line: 26, Column: 50, File-Position: 1253 Stream: #<SB-INT:FORM-TRACKING-STREAM for "file /home/quicklisp/quicklisp-controller/dist/build-cache/cl-png/372e1d3889cf11ca32210874bec5b5fdf3140d61/cl-png-20210702-git/compat.lisp" {10094A4F33}>
...
Unhandled UIOP/LISP-BUILD:COMPILE-FILE-ERROR in thread #<SB-THREAD:THREAD "main thread" RUNNING {1001A18103}>: COMPILE-FILE-ERROR while compiling #<CL-SOURCE-FILE "png" "compat">

Full log here

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.