One option is using save-image from 2htdp/image to save the images as
PNG files and open them using external programs.
https://docs.racket-lang.org/teachpack/2htdpimage.html#%28def._%28%28lib._2htdp%2Fimage..rkt%29._save-image%29%29

If you can use a different language (say racket), another option is
using show-pict from pict:

;; needs the 'require' form from racket (or racket/base)
(require racket/gui/base (only-in pict show-pict))
(show-pict
 (put-image
  (circle 50 "solid" "green")
  50
  50
  (square 100 "solid" "blue")))

Since many functions in pict have the same names as those provided by
2htdp/image, you need only-in to require only the show-pict function.

On Tue, Feb 16, 2021 at 2:53 PM patric...@gmail.com
<patrick.es...@gmail.com> wrote:
>
> I was able to use the Bootstrap teachpack. I am running my program from the 
> command line and racket returns #<image>. Is there a way to view the output 
> outside of Dr. Racket?
>
> On Sunday, February 7, 2021 at 4:51:27 PM UTC-5 Robby Findler wrote:
>>
>> Okay, I've added it. It is pretty straightforward to define it in your own 
>> code in the meantime, Patrick:
>>
>> (define (put-image i1 x y i2)
>>   (place-image i1 x (- (image-height i2) y) i2))
>>
>> Robby
>>
>>
>> On Sun, Feb 7, 2021 at 5:32 AM Stephen De Gabrielle <spdega...@gmail.com> 
>> wrote:
>>>
>>> +1
>>>
>>>
>>> On Sun, 7 Feb 2021 at 03:41, Robby Findler <ro...@cs.northwestern.edu> 
>>> wrote:
>>>>
>>>> Any objection to adding it to 2htdp/image?
>>>>
>>>> Robby
>>>>
>>>> On Sat, Feb 6, 2021 at 6:32 PM Sorawee Porncharoenwase 
>>>> <sorawe...@gmail.com> wrote:
>>>>>
>>>>> As explained in documentation of WeScheme, put-image is only available in 
>>>>> WeScheme. Racket and its libraries don’t have this function.
>>>>>
>>>>> It’s easy to implement it yourself, however, by using place-image and 
>>>>> image-height. Both are available in 2htdp/image
>>>>>
>>>>>
>>>>> On Sat, Feb 6, 2021 at 3:24 PM patric...@gmail.com <patric...@gmail.com> 
>>>>> wrote:
>>>>>>
>>>>>>
>>>>>> What do I need to do to be able to use the "put-image" method from 
>>>>>> WeScheme? I am starting off my program with:
>>>>>>
>>>>>> #lang htdp/bsl
>>>>>>
>>>>>> (require 2htdp/image)
>>>>>>
>>>>>> Is there another package I need to use?
>>>>>>
>>>>>> --
>>>>>> You received this message because you are subscribed to the Google 
>>>>>> Groups "Racket Users" group.
>>>>>> To unsubscribe from this group and stop receiving emails from it, send 
>>>>>> an email to racket-users...@googlegroups.com.
>>>>>> To view this discussion on the web visit 
>>>>>> https://groups.google.com/d/msgid/racket-users/c8788557-0fe6-46a2-be1a-1dbb432ab939n%40googlegroups.com.
>>>>>
>>>>> --
>>>>> You received this message because you are subscribed to the Google Groups 
>>>>> "Racket Users" group.
>>>>> To unsubscribe from this group and stop receiving emails from it, send an 
>>>>> email to racket-users...@googlegroups.com.
>>>>> To view this discussion on the web visit 
>>>>> https://groups.google.com/d/msgid/racket-users/CADcuegvDB8a%2BN13xcr6dcgDo4z92sDqDA%2BkU%3DhjnHffGN1h8Vg%40mail.gmail.com.
>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google Groups 
>>>> "Racket Users" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send an 
>>>> email to racket-users...@googlegroups.com.
>>>> To view this discussion on the web visit 
>>>> https://groups.google.com/d/msgid/racket-users/CAL3TdOPsOKNE6VF606sgX2TZMwug5siPXEiXuVhjSZTfD4JP5A%40mail.gmail.com.
>>>
>>> --
>>> ----
>>>
>>> --
>>> You received this message because you are subscribed to the Google Groups 
>>> "Racket Users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send an 
>>> email to racket-users...@googlegroups.com.
>>>
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/racket-users/CAGHj7-KsQQsx0be-m6mG4ORsMgr9zr2qWh2JZc3QH%2B_RZG7YZA%40mail.gmail.com.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to racket-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/racket-users/e80e29fd-cc01-40c8-8a4d-6ffaeac7cd85n%40googlegroups.com.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/CAMTzy%2Badc8Cr7qYeFSYzMKgE9Euz3X1SLHMAuupjBgpLercLhA%40mail.gmail.com.

Reply via email to