2 #include "leptonica/allheaders.h"
4 #pragma RcB2 LINK "-llept"
11 const struct palpic
* f
= & sprite
.header
;
13 video
.height
= palpic_getspritecount(f
) * palpic_getspriteheight(f
)/parts
;
14 video
.width
= f
->width
*parts
;
15 PIX
* o
= pixCreate(video
.width
, video
.height
, 32);
17 video
.pitch
= video
.width
* 4;
18 prgb
* bufptr
= (prgb
*) o
->data
;
20 for(i
= 0; i
< f
->spritecount
; i
++) {
22 int x
= f
->width
* odd
, y
= palpic_getspriteheight(f
)*(i
/parts
);
23 blit_sprite(x
, y
, &video
, 1, f
, i
, 0);
25 pixWritePng("test.png", o
, 0.0);