Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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/")
like image 475
Darth Bobo Avatar asked Oct 16 '25 15:10

Darth Bobo


1 Answers

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.

like image 131
Óscar López Avatar answered Oct 18 '25 09:10

Óscar López



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!