#include "RLEBitmap.h" #include "Drawing.h" #include #include size_t SizeOfRLEBitmapFromBitmap(const Bitmap *bitmap) { return SizeOfRLEBitmapFromPartialBitmap(bitmap,0,0,bitmap->width,bitmap->height); } size_t SizeOfRLEBitmapFromPartialBitmap(const Bitmap *bitmap,int x0,int y0,int width,int height) { size_t numpixels=0; for(int y=0;ywidth,bitmap->height); } void InitializeRLEBitmapFromPartialBitmap(RLEBitmap *self,const Bitmap *bitmap,int x0,int y0,int width,int height) { self->width=width; self->height=height; Pixel *ptr=self->codes; for(int y=0;y