3
$Id: pic-read.scm,v 1.6 2001/12/20 03:24:21 cph Exp $
5
Copyright (c) 1991-1999, 2001 Massachusetts Institute of Technology
7
This program is free software; you can redistribute it and/or modify
3
$Id: pic-read.scm,v 1.9 2003/03/08 02:48:36 cph Exp $
5
Copyright (c) 1991,1992,2001,2003 Massachusetts Institute of Technology
7
This file is part of MIT/GNU Scheme.
9
MIT/GNU Scheme is free software; you can redistribute it and/or modify
8
10
it under the terms of the GNU General Public License as published by
9
11
the Free Software Foundation; either version 2 of the License, or (at
10
12
your option) any later version.
12
This program is distributed in the hope that it will be useful, but
14
MIT/GNU Scheme is distributed in the hope that it will be useful, but
13
15
WITHOUT ANY WARRANTY; without even the implied warranty of
14
16
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15
17
General Public License for more details.
17
19
You should have received a copy of the GNU General Public License
18
along with this program; if not, write to the Free Software
19
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
20
along with MIT/GNU Scheme; if not, write to the Free Software
21
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
23
26
;;;; Procedures to read a file in raw pgm format into a picture
95
98
(error "Object loaded is not a record:" pic-mimic))
96
99
(let ((mimic-type (record-type-descriptor pic-mimic)))
97
100
(if (not (equal? (record-type-field-names mimic-type)
98
(record-type-field-names picture-type)))
101
(record-type-field-names <picture>)))
99
102
(error "Object loaded is not a picture:" pic-mimic))
101
104
(make-picture ((record-accessor mimic-type 'width) pic-mimic)