I am trying to automatically generate PPM P5 files.
In order to write the binary part of the files, I am using

put_code/1

It says that accepts non negative integer numbers. My aim is to
produce greyscale images so I need to write numbers that represent
the grey level. Of course, numbers go from 0 to 255.
That's the problem.

       put_code(1)
up to
       put_code(255)
work;

but

       put_code(0)

does not.

I get

ERROR:Exception error(representation_error(character_code),put_code/1) occurred while evaluating the query " put_code(0) ".

Please, give me a suggestion or an alternative solution for this problem.

Thanks in advance

----------------------------------------------------------------
Massimo De Gregorio
Research Scientist
Istituto di Cibernetica "Eduardo Caianiello" - CNR
Via Campi Flegrei 34
Comprensorio "A. Olivetti" - Ed. 70
80078 Pozzuoli (NA) - ITALIA
Tel. (+ 39) 0818675151
Fax: (+ 39) 0818675158
Skype: massimo.de.gregorio
E-mail: [email protected]
----------------------------------------------------------------

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.



_______________________________________________
Users-prolog mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/users-prolog

Reply via email to