Permalink
Browse files

moved stuff from opticl here into opticl-test

  • Loading branch information...
0 parents commit 94344abbdb42f97faa0753098300773acf68466a @slyrus committed Mar 3, 2011
@@ -0,0 +1,11 @@
+
+(in-package :opticl-test)
+
+(defun test-shapes ()
+ (let ((height 16) (width 16))
+ (let ((img (make-8-bit-rgb-image height width)))
+ (draw-rectangle img 2 2 5 5 #x90 #x40 #x00)
+ (draw-rectangle img 7 7 12 12 #x25 #xb0 #x40)
+ img)))
+
+(opticl::label-components (test-shapes))
@@ -0,0 +1,25 @@
+
+(in-package #:opticl-test)
+
+(defparameter *tower*
+ (read-jpeg-file (test-image "tower-gray.jpg")))
+
+(write-png-file
+ (output-image "tower-convolve.png")
+ (opticl::discrete-convolve *tower* *edge-kernel*))
+
+(defparameter *truck*
+ (read-jpeg-file (test-image "truck.jpeg")))
+
+(write-png-file
+ (output-image "truck-convolve.png")
+ (opticl::discrete-convolve *truck* *sharpen-kernel*))
+
+(write-png-file
+ (output-image "truck-blur.png")
+ (opticl::blur-image *truck*))
+
+(write-png-file
+ (output-image "truck-emboss.png")
+ (opticl::emboss-image *truck*))
+
@@ -0,0 +1,12 @@
+
+(in-package #:opticl-test)
+
+(defun test-gamma ()
+ (declare (optimize (debug 3)))
+ (let ((img (test-circles)))
+ (write-png-file (output-image "gamma-orig.png") img)
+ (let ((img2 (opticl::apply-gamma img 0.5)))
+ (write-png-file (output-image "gamma-0.5.png") img2))
+ (let ((img3 (opticl::apply-gamma img 2)))
+ (write-png-file (output-image "gamma-2.png") img3))))
+

Large diffs are not rendered by default.

Oops, something went wrong.
Binary file not shown.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.

0 comments on commit 94344ab

Please sign in to comment.