mirror of
https://github.com/glest/glest-source.git
synced 2025-08-13 03:44:00 +02:00
- we can now save jpg screenshots and can also convert model textures to jpg (WARNING jpg DOES NOT support alpha channel (for transparency) so use this wisely
This commit is contained in:
@@ -116,6 +116,23 @@ public:
|
||||
virtual void write(uint8 *pixels);
|
||||
};
|
||||
|
||||
class PixmapIoJpg: public PixmapIo {
|
||||
private:
|
||||
FILE *file;
|
||||
string path;
|
||||
|
||||
public:
|
||||
PixmapIoJpg();
|
||||
virtual ~PixmapIoJpg();
|
||||
|
||||
virtual void openRead(const string &path);
|
||||
virtual void read(uint8 *pixels);
|
||||
virtual void read(uint8 *pixels, int components);
|
||||
|
||||
virtual void openWrite(const string &path, int w, int h, int components);
|
||||
virtual void write(uint8 *pixels);
|
||||
};
|
||||
|
||||
// =====================================================
|
||||
// class Pixmap1D
|
||||
// =====================================================
|
||||
@@ -179,6 +196,7 @@ public:
|
||||
void saveBmp(const string &path);
|
||||
void saveTga(const string &path);
|
||||
void savePng(const string &path);
|
||||
void saveJpg(const string &path);
|
||||
|
||||
//get
|
||||
int getW() const {return w;}
|
||||
|
Reference in New Issue
Block a user