diff options
author | Einar Johan Trøan Sømåen | 2012-07-27 17:43:17 +0200 |
---|---|---|
committer | Einar Johan Trøan Sømåen | 2012-07-27 17:43:17 +0200 |
commit | 6262a2ac8751b1bfff7becc8cf181ab9dd16bf87 (patch) | |
tree | 91a8caaa6f67dbe292c5e0da7cbed13b1d814c6a /engines/wintermute/base | |
parent | a9e9ed7d3b5411e5eaf44ac87f1a10ce53e962d9 (diff) | |
download | scummvm-rg350-6262a2ac8751b1bfff7becc8cf181ab9dd16bf87.tar.gz scummvm-rg350-6262a2ac8751b1bfff7becc8cf181ab9dd16bf87.tar.bz2 scummvm-rg350-6262a2ac8751b1bfff7becc8cf181ab9dd16bf87.zip |
WINTERMUTE: Use an arbitrary size nearest neighbour scaler for save thumbnails. Thanks to clone2727
Diffstat (limited to 'engines/wintermute/base')
-rw-r--r-- | engines/wintermute/base/gfx/base_image.cpp | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/engines/wintermute/base/gfx/base_image.cpp b/engines/wintermute/base/gfx/base_image.cpp index 628bffff55..3aa21d0f7f 100644 --- a/engines/wintermute/base/gfx/base_image.cpp +++ b/engines/wintermute/base/gfx/base_image.cpp @@ -224,27 +224,15 @@ bool BaseImage::writeBMPToStream(Common::WriteStream *stream) const { //////////////////////////////////////////////////////////////////////////
bool BaseImage::copyFrom(BaseImage *origImage, int newWidth, int newHeight) {
-#if 0
- if (_bitmap) {
- FreeImage_Unload(_bitmap);
- }
-
- if (NewWidth == 0) {
- NewWidth = FreeImage_GetWidth(OrigImage->GetBitmap());
- }
- if (NewHeight == 0) {
- NewHeight = FreeImage_GetHeight(OrigImage->GetBitmap());
- }
+ // WME Lite used FILTER_BILINEAR with FreeImage_Rescale here.
- _bitmap = FreeImage_Rescale(OrigImage->GetBitmap(), NewWidth, NewHeight, FILTER_BILINEAR);
-#endif
TransparentSurface temp(*origImage->_surface, false);
if (_deletableSurface) {
_deletableSurface->free();
delete _deletableSurface;
_deletableSurface = NULL;
}
- _surface = _deletableSurface = temp.scale(newWidth, newHeight);
+ _surface = _deletableSurface = temp.scaleSafe((uint16)newWidth, (uint16)newHeight);
return true;
}
|