updated resizer
This commit is contained in:
@@ -6,31 +6,33 @@
|
||||
#include <setjmp.h>
|
||||
#include "jpeglib-extern.h"
|
||||
#include "Reader.h"
|
||||
#include "Filter.h"
|
||||
|
||||
struct jpeg_error
|
||||
{
|
||||
struct jpeg_error_mgr pub;
|
||||
jmp_buf setjmp_buffer;
|
||||
char *buffer;
|
||||
char buffer[JMSG_LENGTH_MAX];
|
||||
};
|
||||
|
||||
class JPEG: public Reader
|
||||
{
|
||||
public:
|
||||
bool Read(FILE *f, Resizer *resizer, char error[1024]);
|
||||
bool Read(FILE *f, Filter *pOutput, char error[1024]);
|
||||
|
||||
private:
|
||||
Resizer *m_Resizer;
|
||||
Filter *m_pOutputFilter;
|
||||
struct jpeg_error m_JErr;
|
||||
};
|
||||
|
||||
class JPEGCompressor
|
||||
class JPEGCompressor: public Filter
|
||||
{
|
||||
public:
|
||||
JPEGCompressor(FILE *f);
|
||||
~JPEGCompressor();
|
||||
|
||||
bool Init(int width, int height, int quality);
|
||||
bool Init(int iSourceWidth, int iSourceHeight, int iBPP);
|
||||
void SetQuality(int quality);
|
||||
bool WriteRow(uint8_t *row);
|
||||
bool Finish();
|
||||
|
||||
@@ -40,6 +42,7 @@ public:
|
||||
|
||||
private:
|
||||
FILE *m_File;
|
||||
int m_iQuality;
|
||||
struct jpeg_compress_struct m_CInfo;
|
||||
struct jpeg_error m_JErr;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user