X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=lib%2Frfxswf.h;h=5fa7d1b74595050b24083dca7a19975c00f3d265;hb=efc92c191c8417ab626b0e8e639f8d516e4000ff;hp=2e8bb433d6456bc70b8c2f87dfd7416221a068ba;hpb=2ce931b1e2215670583c705dc87c19094b42990c;p=swftools.git diff --git a/lib/rfxswf.h b/lib/rfxswf.h index 2e8bb43..5fa7d1b 100644 --- a/lib/rfxswf.h +++ b/lib/rfxswf.h @@ -71,6 +71,10 @@ extern "C" { #define REVERSESWAP32(s) (REVERSESWAP16(((s)>>16)&0x0000ffff)|((REVERSESWAP16(s)<<16)&0xffff0000)) #endif +#define ALLOC_ARRAY(type, num) (((type)*)rfxalloc(sizeof(type)*(num))) +void* rfxalloc(int size); +void rfxdealloc(void*data); + // SWF Types typedef unsigned long U32; @@ -351,6 +355,12 @@ typedef struct _LINESTYLE RGBA color; } LINESTYLE, * LPLINESTYLE; +#define FILL_SOLID 0x00 +#define FILL_LINEAR 0x10 // Gradient +#define FILL_RADIAL 0x12 +#define FILL_TILED 0x40 // Bitmap +#define FILL_CLIPPED 0x41 + typedef struct _FILLSTYLE { U8 type; RGBA color; @@ -693,6 +703,7 @@ void swf_GetJPEGSize(char * fname, int*width, int*height); int swf_SetJPEGBits(TAG * t,char * fname,int quality); void swf_SetJPEGBits2(TAG * t,U16 width,U16 height,RGBA * bitmap,int quality); int swf_SetJPEGBits3(TAG * tag,U16 width,U16 height,RGBA* bitmap, int quality); +RGBA* swf_JPEG2TagToImage(TAG*tag, int*width, int*height); #define BYTES_PER_SCANLINE(width) ((width+3)&0xfffffffc) @@ -703,6 +714,9 @@ int swf_SetJPEGBits3(TAG * tag,U16 width,U16 height,RGBA* bitmap, int quality); int swf_SetLosslessBits(TAG * t,U16 width,U16 height,void * bitmap,U8 bitmap_flags); int swf_SetLosslessBitsIndexed(TAG * t,U16 width,U16 height,U8 * bitmap,RGBA * palette,U16 ncolors); int swf_SetLosslessBitsGrayscale(TAG * t,U16 width,U16 height,U8 * bitmap); +RGBA* swf_DefineLosslessBitsTagToImage(TAG*tag, int*width, int*height); + +RGBA* swf_ExtractImage(TAG*tag, int*dwidth, int*dheight); // swfsound.c void swf_SetSoundStreamHead(TAG*tag, int avgnumsamples);