bitmap-implode

Synopsis

(bitmap-implode list cols rows)

Parameters

  • list : a list of sub-bitmaps with their original position set
  • cols : the width of the resulting new bitmap
  • rows : the height of the resulting new bitmap

Description

A list of bitmaps is “imploded” resulting in a new bitmap with specified dimensions.

Side Effects

Return Value

The resulting bitmap is returned.

Implementation

(define (bitmap-implode list cols rows)
 (let ((ziel (bitmap-create cols rows)))
   (for-each (lambda (x) (bitmap-implant! x ziel)) list)
   ziel))

Example

> (define a (bitmap-readpng "bitmap.ipng"))
a
> (define b (bitmap-explode a))
b
> (define c (bitmap-implode b (bitmap-width a) (bitmap-height a)))
c
> (bitmap-equal? a c)
#t
>