aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md4
-rw-r--r--image-format/pnm.scm (renamed from pnm.scm)14
-rw-r--r--image-format/pnm/image.scm (renamed from pnm/image.scm)2
-rw-r--r--image-format/pnm/pbm.scm (renamed from pnm/pbm.scm)10
-rw-r--r--image-format/pnm/pgm.scm (renamed from pnm/pgm.scm)16
-rw-r--r--image-format/pnm/ppm.scm (renamed from pnm/ppm.scm)16
-rw-r--r--image-format/pnm/private/bitwise.scm (renamed from pnm/private/bitwise.scm)2
-rw-r--r--image-format/pnm/private/checker.scm (renamed from pnm/private/checker.scm)4
-rw-r--r--image-format/pnm/private/double-byte.scm (renamed from pnm/private/double-byte.scm)4
-rw-r--r--image-format/pnm/read.scm (renamed from pnm/read.scm)16
-rw-r--r--image-format/pnm/write.scm (renamed from pnm/write.scm)8
11 files changed, 48 insertions, 48 deletions
diff --git a/README.md b/README.md
index 34ec222..54cccd9 100644
--- a/README.md
+++ b/README.md
@@ -6,10 +6,10 @@ accessing and modifying pixel data.
## Usage
-### Import `(pnm)` library
+### Import `(image-format pnm)` library
```scheme
-(import (pnm))
+(import (image-format pnm))
```
### Image
diff --git a/pnm.scm b/image-format/pnm.scm
index 46fc730..f4f93da 100644
--- a/pnm.scm
+++ b/image-format/pnm.scm
@@ -16,7 +16,7 @@
;;; You should have received a copy of the GNU Lesser General Public License
;;; along with R7RS-PNM. If not, see <https://www.gnu.org/licenses/>.
-(define-library (pnm)
+(define-library (image-format pnm)
(export make-pbm-image
make-ppm-image
make-pgm-image
@@ -31,9 +31,9 @@
pnm-parse-error?
pnm-image-write)
(import (scheme base)
- (pnm image)
- (pnm pbm)
- (pnm pgm)
- (pnm ppm)
- (pnm read)
- (pnm write)))
+ (image-format pnm image)
+ (image-format pnm pbm)
+ (image-format pnm pgm)
+ (image-format pnm ppm)
+ (image-format pnm read)
+ (image-format pnm write)))
diff --git a/pnm/image.scm b/image-format/pnm/image.scm
index f9d0b83..2e64752 100644
--- a/pnm/image.scm
+++ b/image-format/pnm/image.scm
@@ -16,7 +16,7 @@
;;; You should have received a copy of the GNU Lesser General Public License
;;; along with R7RS-PNM. If not, see <https://www.gnu.org/licenses/>.
-(define-library (pnm image)
+(define-library (image-format pnm image)
(export make-pnm-image
pnm-image?
pnm-image-type
diff --git a/pnm/pbm.scm b/image-format/pnm/pbm.scm
index d580616..eda2677 100644
--- a/pnm/pbm.scm
+++ b/image-format/pnm/pbm.scm
@@ -16,14 +16,14 @@
;;; You should have received a copy of the GNU Lesser General Public License
;;; along with R7RS-PNM. If not, see <https://www.gnu.org/licenses/>.
-(define-library (pnm pbm)
+(define-library (image-format pnm pbm)
(export make-pbm-image
%make-pbm-image)
(import (scheme base)
(scheme case-lambda)
- (pnm image)
- (pnm private checker)
- (pnm private bitwise))
+ (image-format pnm image)
+ (image-format pnm private checker)
+ (image-format pnm private bitwise))
(begin
(define make-pbm-image
(case-lambda
@@ -53,7 +53,7 @@
(bytevector-u8-set! data byte-idx
(copy-bit (- 7 bit-idx) byte b)))))
(unless (= byte-count (bytevector-length data))
- (error (string-append "(pnm pbm) make-pbm-image: Invalid bytevector length" byte-count)))
+ (error (string-append "(image-format pnm pbm) make-pbm-image: Invalid bytevector length" byte-count)))
(let ((check-xy (make-xy-checker width height))
(check-boolean-value (make-boolean-value-checker)))
(make-pnm-image 'pbm width height #t data
diff --git a/pnm/pgm.scm b/image-format/pnm/pgm.scm
index 5a4f027..39711e9 100644
--- a/pnm/pgm.scm
+++ b/image-format/pnm/pgm.scm
@@ -16,14 +16,14 @@
;;; You should have received a copy of the GNU Lesser General Public License
;;; along with R7RS-PNM. If not, see <https://www.gnu.org/licenses/>.
-(define-library (pnm pgm)
+(define-library (image-format pnm pgm)
(export make-pgm-image
%make-pgm-image)
(import (scheme base)
(scheme case-lambda)
- (pnm image)
- (pnm private checker)
- (pnm private double-byte))
+ (image-format pnm image)
+ (image-format pnm private checker)
+ (image-format pnm private double-byte))
(begin
(define make-pgm-image
(case-lambda
@@ -34,7 +34,7 @@
((width height maxval unsafe?)
(when (or (< maxval 0)
(< 65536 maxval))
- (error "(pnm pgm) make-pgm: maxval is out of range"))
+ (error "(image-format pnm pgm) make-pgm: maxval is out of range"))
(let* ((byte-count (* width height
(if (< maxval 256)
1
@@ -57,7 +57,7 @@
(pixel-setter x y v))))
(when (or (< maxval 0)
(< 65536 maxval))
- (error "(pnm pgm) make-pgm: maxval is out of range"))
+ (error "(image-format pnm pgm) make-pgm: maxval is out of range"))
(if (< maxval 256)
(let ((byte-count (* width height)))
(define (xy->idx x y)
@@ -69,7 +69,7 @@
(let ((idx (xy->idx x y)))
(bytevector-u8-set! data idx v)))
(unless (= byte-count (bytevector-length data))
- (error (string-append "(pnm pbm) make-pbm-image: Invalid bytevector length" byte-count)))
+ (error (string-append "(image-format pnm pbm) make-pbm-image: Invalid bytevector length" byte-count)))
(make-pnm-image 'pgm width height maxval data
(if unsafe? pixel-getter (make-safe-pixel-getter pixel-getter))
(if unsafe? pixel-setter (make-safe-pixel-setter pixel-setter))))
@@ -85,7 +85,7 @@
(bytevector-u8-set! data idx v1)
(bytevector-u8-set! data (+ idx 1) v2))))
(unless (= byte-count (bytevector-length data))
- (error (string-append "(pnm pbm) make-pbm-image: Invalid bytevector length" byte-count)))
+ (error (string-append "(image-format pnm pbm) make-pbm-image: Invalid bytevector length" byte-count)))
(make-pnm-image 'pgm width height maxval data
(if unsafe? pixel-getter (make-safe-pixel-getter pixel-getter))
(if unsafe? pixel-setter (make-safe-pixel-setter pixel-setter))))))))
diff --git a/pnm/ppm.scm b/image-format/pnm/ppm.scm
index ff1abb3..2a644bf 100644
--- a/pnm/ppm.scm
+++ b/image-format/pnm/ppm.scm
@@ -16,14 +16,14 @@
;;; You should have received a copy of the GNU Lesser General Public License
;;; along with R7RS-PNM. If not, see <https://www.gnu.org/licenses/>.
-(define-library (pnm ppm)
+(define-library (image-format pnm ppm)
(export make-ppm-image
%make-ppm-image)
(import (scheme base)
(scheme case-lambda)
- (pnm image)
- (pnm private checker)
- (pnm private double-byte))
+ (image-format pnm image)
+ (image-format pnm private checker)
+ (image-format pnm private double-byte))
(begin
(define make-ppm-image
(case-lambda
@@ -34,7 +34,7 @@
((width height maxval unsafe?)
(when (or (< maxval 0)
(< 65536 maxval))
- (error "(pnm ppm) make-ppm-image: Maxval is out of range"))
+ (error "(image-format pnm ppm) make-ppm-image: Maxval is out of range"))
(let ((data (make-bytevector (* width
height
(if (< maxval 256)
@@ -62,7 +62,7 @@
(pixel-setter x y r g b))))
(when (or (< maxval 0)
(< 65536 maxval))
- (error "(pnm ppm) make-ppm-image: Maxval is out of range"))
+ (error "(image-format pnm ppm) make-ppm-image: Maxval is out of range"))
(if (< maxval 256)
(let* ((w*3 (* width 3))
(byte-count (* w*3 height)))
@@ -78,7 +78,7 @@
(bytevector-u8-set! data (+ idx 1) g)
(bytevector-u8-set! data (+ idx 2) b)))
(unless (= byte-count (bytevector-length data))
- (error (string-append "(pnm pbm) make-pbm-image: Invalid bytevector length" byte-count)))
+ (error (string-append "(image-format pnm pbm) make-pbm-image: Invalid bytevector length" byte-count)))
(make-pnm-image 'ppm width height maxval data
(if unsafe? pixel-getter (make-safe-pixel-getter pixel-getter))
(if unsafe? pixel-setter (make-safe-pixel-setter pixel-setter))))
@@ -105,7 +105,7 @@
(bytevector-u8-set! data (+ idx 4) b1)
(bytevector-u8-set! data (+ idx 5) b2))))
(unless (= byte-count (bytevector-length data))
- (error (string-append "(pnm pbm) make-pbm-image: Invalid bytevector length" byte-count)))
+ (error (string-append "(image-format pnm pbm) make-pbm-image: Invalid bytevector length" byte-count)))
(make-pnm-image 'ppm width height maxval data
(if unsafe? pixel-getter (make-safe-pixel-getter pixel-getter))
(if unsafe? pixel-setter (make-safe-pixel-setter pixel-setter))))))))
diff --git a/pnm/private/bitwise.scm b/image-format/pnm/private/bitwise.scm
index a2f2f74..ffca4e9 100644
--- a/pnm/private/bitwise.scm
+++ b/image-format/pnm/private/bitwise.scm
@@ -16,7 +16,7 @@
;;; You should have received a copy of the GNU Lesser General Public License
;;; along with R7RS-PNM. If not, see <https://www.gnu.org/licenses/>.
-(define-library (pnm private bitwise)
+(define-library (image-format pnm private bitwise)
(export bitwise-and
bitwise-ior
arithmetic-shift
diff --git a/pnm/private/checker.scm b/image-format/pnm/private/checker.scm
index e212948..8b7fcb6 100644
--- a/pnm/private/checker.scm
+++ b/image-format/pnm/private/checker.scm
@@ -16,13 +16,13 @@
;;; You should have received a copy of the GNU Lesser General Public License
;;; along with R7RS-PNM. If not, see <https://www.gnu.org/licenses/>.
-(define-library (pnm private checker)
+(define-library (image-format pnm private checker)
(export make-xy-checker
make-value-checker
make-boolean-value-checker)
(import (scheme base)
(scheme case-lambda)
- (pnm image))
+ (image-format pnm image))
(begin
(define (make-xy-checker width height)
(lambda (x y)
diff --git a/pnm/private/double-byte.scm b/image-format/pnm/private/double-byte.scm
index fd40336..156b409 100644
--- a/pnm/private/double-byte.scm
+++ b/image-format/pnm/private/double-byte.scm
@@ -16,10 +16,10 @@
;;; You should have received a copy of the GNU Lesser General Public License
;;; along with R7RS-PNM. If not, see <https://www.gnu.org/licenses/>.
-(define-library (pnm private double-byte)
+(define-library (image-format pnm private double-byte)
(export split-double-byte combine-bytes)
(import (scheme base)
- (pnm private bitwise))
+ (image-format pnm private bitwise))
(begin
(define (split-double-byte v)
(values (arithmetic-shift v -8)
diff --git a/pnm/read.scm b/image-format/pnm/read.scm
index 4c7dd52..0086113 100644
--- a/pnm/read.scm
+++ b/image-format/pnm/read.scm
@@ -16,15 +16,15 @@
;;; You should have received a copy of the GNU Lesser General Public License
;;; along with R7RS-PNM. If not, see <https://www.gnu.org/licenses/>.
-(define-library (pnm read)
+(define-library (image-format pnm read)
(export pnm-image-read
pnm-parse-error?)
(import (scheme base)
(scheme case-lambda)
- (pnm image)
- (pnm pbm)
- (pnm pgm)
- (pnm ppm))
+ (image-format pnm image)
+ (image-format pnm pbm)
+ (image-format pnm pgm)
+ (image-format pnm ppm))
(begin
(define pnm-image-read
(case-lambda
@@ -226,11 +226,11 @@
(else number)))))))
(define (unexpected-magic-number-error)
- (raise (pnm-parse-error "(pnm read) pnm-image-read: Not supported magic number")))
+ (raise (pnm-parse-error "(image-format pnm read) pnm-image-read: Not supported magic number")))
(define (unexpected-eof-error)
- (raise (pnm-parse-error "(pnm read) pnm-image-read: Unexpected end of file")))
+ (raise (pnm-parse-error "(image-format pnm read) pnm-image-read: Unexpected end of file")))
(define (unexpected-character-error)
- (raise (pnm-parse-error "(pnm read) pnm-image-read: Unexpected character"))))
+ (raise (pnm-parse-error "(image-format pnm read) pnm-image-read: Unexpected character"))))
(cond-expand
((library (srfi 35))
(import (srfi 35))
diff --git a/pnm/write.scm b/image-format/pnm/write.scm
index 60dbd0e..b2f807c 100644
--- a/pnm/write.scm
+++ b/image-format/pnm/write.scm
@@ -16,11 +16,11 @@
;;; You should have received a copy of the GNU Lesser General Public License
;;; along with R7RS-PNM. If not, see <https://www.gnu.org/licenses/>.
-(define-library (pnm write)
+(define-library (image-format pnm write)
(export pnm-image-write)
(import (scheme base)
(scheme case-lambda)
- (pnm image))
+ (image-format pnm image))
(begin
(define pnm-image-write
(case-lambda
@@ -33,7 +33,7 @@
((pbm)
(write-string-u8 "P4\n" out))
(else
- (error "(pnm write) pnm-image-write: Not supported type" (pnm-image-type pnm-image))))
+ (error "(image-format pnm write) pnm-image-write: Not supported type" (pnm-image-type pnm-image))))
(write-string-u8 (number->string (pnm-image-width pnm-image)) out)
(write-string-u8 " " out)
(write-string-u8 (number->string (pnm-image-height pnm-image)) out)
@@ -57,7 +57,7 @@
((pbm)
(write-string-u8 "P1\n" out))
(else
- (error "(pnm write) image-write: Not supported type" (pnm-image-type pnm-image))))
+ (error "(image-format pnm write) image-write: Not supported type" (pnm-image-type pnm-image))))
(write-string-u8 (number->string (pnm-image-width pnm-image)) out)
(write-string-u8 " " out)
(write-string-u8 (number->string (pnm-image-height pnm-image)) out)