imageurlschemerackethtdp

How To Change Image Sizes in Racket


I am making a game using racket and need a background bitmap image. But the image I have selected is too big. How do I change the size? What I have:

(bitmap/url "http://www.example.com/")

Solution

  • Import this package:

    (require htdp/image)
    

    And use the shrink procedures defined in that package.

    EDIT :

    As has been pointed out in the comments, 2htdp/image would be a better alternative:

    (require 2htdp/image)
    

    Take a look at the scale procedure.