1

I need to save images generated in ucblogo by using commands. I have a lot of logo programs to be executed sequentially and need to store the output logo image for each one as a jpeg file. I am using Ubuntu 16.04.

I have tried using the savepict command at the end of each Logo program. It saves some image but that image has does not open.

Any suggestions?

Apurv
  • 135
  • 8

1 Answers1

1

Try using the EPSPICT command in UCBLogo and then use an external converter to convert to JPEG. The external converter could be the CONVERT command from the Imagemagick package

EPSPICT filename

command.  Writes a file with the specified name, containing
an Encapsulated Postscript (EPS) representation of the state
of the graphics window.  This file can be imported into other
programs that understand EPS format.  Restrictions: the
drawing cannot use FILL, PENERASE, or PENREVERSE; any
such instructions will be ignored in the translation to
Postscript form.
DanielAjoy
  • 31
  • 2
  • It does save an image. The image is in postscript(.ps) format. On converting it to jpeg, all i get is a black image, nothing else. Is this a problem with ucblogo ? – Apurv Jan 17 '18 at 16:06
  • I did: setbg 7 setpc 0 repeat 4 [fd 100 rt 90] epspic "file.eps then file.eps shows a black square on a white background. Then I converted it to jpeg exiting ucblogo with the command: convert file.eps file.jpeg – DanielAjoy Jan 18 '18 at 22:47