X-Git-Url: http://git.xonotic.org/?p=xonotic%2Fdarkplaces.git;a=blobdiff_plain;f=jpeg.h;h=f869d6a091dd2e77741fa6f657b30c5b130678e6;hp=d6bf4808a48c83ced58d388d3246ca10857fef6e;hb=e179299248819faf4c25ac6e6360eb6d8246e3e7;hpb=8bd9d978b4c3c249c7adf0b7f645e61b0f4ec513 diff --git a/jpeg.h b/jpeg.h index d6bf4808..f869d6a0 100644 --- a/jpeg.h +++ b/jpeg.h @@ -24,11 +24,18 @@ #ifndef JPEG_H #define JPEG_H +#include +#include "qtypes.h" -qboolean JPEG_OpenLibrary (void); +qbool JPEG_OpenLibrary (void); void JPEG_CloseLibrary (void); -qbyte* JPEG_LoadImage (const qbyte *f, int matchwidth, int matchheight); -qboolean JPEG_SaveImage_preflipped (const char *filename, int width, int height, qbyte *data); +unsigned char* JPEG_LoadImage_BGRA (const unsigned char *f, int filesize, int *miplevel); +qbool JPEG_SaveImage_preflipped (const char *filename, int width, int height, unsigned char *data); + +/*! \returns 0 if failed, or the size actually used. + */ +size_t JPEG_SaveImage_to_Buffer (char *jpegbuf, size_t jpegsize, int width, int height, unsigned char *data); +qbool Image_Compress(const char *imagename, size_t maxsize, void **buf, size_t *size); #endif