error: pointer of type 'void *' used in arithmetic April 13, 2009 03:40AM | Registered: 15 years ago Posts: 10 |
main.cpp: In function 'void drawPng(const unsigned char*, u16, u16)': main.cpp:45: error: pointer of type 'void *' used in arithmetic main.cpp:45: error: pointer of type 'void *' used in arithmetic
void drawPng(const unsigned char *img, u16 x, u16 y) { IMGCTX ctx; PNGUPROP imgProp; ctx = PNGU_SelectImageFromBuffer(img); PNGU_GetImageProperties(ctx, &imgProp); ln 45 PNGU_DECODE_TO_COORDS_YCbYCr(ctx, x, y, imgProp.imgWidth, imgProp.imgHeight, rmode->fbWidth, rmode->xfbHeight, xfb); }
Re: error: pointer of type 'void *' used in arithmetic April 13, 2009 07:14AM | Registered: 15 years ago Posts: 10 |
// Macro for decoding an image inside a buffer at given coordinates. #define PNGU_DECODE_TO_COORDS_YCbYCr(ctx,coordX,coordY,imgWidth,imgHeight,bufferWidth,bufferHeight,buffer) \ \ PNGU_DecodeToYCbYCr (ctx, imgWidth, imgHeight, ((void *) buffer) + (coordY) * (bufferWidth) * 2 + \ (coordX) * 2, (bufferWidth) - (imgWidth))