Skip to content
Permalink
Browse files

Apparently pngload does not return a static-vector anymore, even when…

… requested. Huh.
  • Loading branch information...
Shinmera committed Aug 30, 2019
1 parent 6f2d880 commit 415abd1f5ff6f36f637039db882458c3adea9cb9
Showing with 10 additions and 12 deletions.
  1. +10 −12 assets/image.lisp
@@ -41,18 +41,16 @@
(4 :bgra))))))

(defmethod load-image (path (type (eql :png)) &key)
(let ((png (pngload:load-file path :flatten T :flip-y T :static-vector T)))
(mark-static-vector (pngload:data png))
(with-cleanup-on-failure (maybe-free-static-vector (pngload:data png))
(values (pngload:data png)
(pngload:width png)
(pngload:height png)
(infer-pixel-type (pngload:bit-depth png) :unsigned)
(ecase (pngload:color-type png)
(:greyscale :red)
(:greyscale-alpha :rg)
(:truecolour :rgb)
(:truecolour-alpha :rgba))))))
(let ((png (pngload:load-file path :flatten T :flip-y T)))
(values (pngload:data png)
(pngload:width png)
(pngload:height png)
(infer-pixel-type (pngload:bit-depth png) :unsigned)
(ecase (pngload:color-type png)
(:greyscale :red)
(:greyscale-alpha :rg)
(:truecolour :rgb)
(:truecolour-alpha :rgba)))))

(defmethod load-image (path (type (eql :tiff)) &key)
(let* ((tiff (retrospectiff:read-tiff-file path))

0 comments on commit 415abd1

Please sign in to comment.
You can’t perform that action at this time.