Review of image classes interfaces, part 3

This commit is contained in:
heckflosse
2018-11-19 14:12:16 +01:00
parent 512adf5b62
commit 5b3fd8ddba
3 changed files with 47 additions and 42 deletions

View File

@@ -49,53 +49,55 @@ public:
Image8* to8() const;
Image16* to16() const;
virtual void getStdImage (const ColorTemp &ctemp, int tran, Imagefloat* image, PreviewProps pp) const;
void getStdImage (const ColorTemp &ctemp, int tran, Imagefloat* image, PreviewProps pp) const override;
virtual const char* getType () const
const char* getType () const override
{
return sImagefloat;
}
virtual int getBPS () const
int getBPS () const override
{
return 8 * sizeof(float);
}
virtual void getScanline (int row, unsigned char* buffer, int bps, bool isFloat = false) const;
virtual void setScanline (int row, unsigned char* buffer, int bps, unsigned int numSamples);
void getScanline (int row, unsigned char* buffer, int bps, bool isFloat = false) const override;
void setScanline (int row, unsigned char* buffer, int bps, unsigned int numSamples) override;
// functions inherited from IImagefloat:
virtual MyMutex& getMutex ()
MyMutex& getMutex () override
{
return mutex ();
}
virtual cmsHPROFILE getProfile () const
cmsHPROFILE getProfile () const override
{
return getEmbeddedProfile ();
}
virtual int getBitsPerPixel () const
int getBitsPerPixel () const override
{
return 8 * sizeof(float);
}
virtual int saveToFile (const Glib::ustring &fname) const
int saveToFile (const Glib::ustring &fname) const override
{
return save (fname);
}
virtual int saveAsPNG (const Glib::ustring &fname, int bps = -1) const
int saveAsPNG (const Glib::ustring &fname, int bps = -1) const override
{
return savePNG (fname, bps);
}
virtual int saveAsJPEG (const Glib::ustring &fname, int quality = 100, int subSamp = 3) const
int saveAsJPEG (const Glib::ustring &fname, int quality = 100, int subSamp = 3) const override
{
return saveJPEG (fname, quality, subSamp);
}
virtual int saveAsTIFF (const Glib::ustring &fname, int bps = -1, bool isFloat = false, bool uncompressed = false) const
int saveAsTIFF (const Glib::ustring &fname, int bps = -1, bool isFloat = false, bool uncompressed = false) const override
{
return saveTIFF (fname, bps, isFloat, uncompressed);
}
virtual void setSaveProgressListener (ProgressListener* pl)
void setSaveProgressListener (ProgressListener* pl) override
{
setProgressListener (pl);
}
virtual void free ()
void free () override
{
delete this;
}