diff --git a/bitmap.c b/bitmap.c index ff3e7aa..72927ea 100644 --- a/bitmap.c +++ b/bitmap.c @@ -37,21 +37,23 @@ bool cOSDImageBitmap::DrawMagick(const char *Filename, int x, int y, int width, { Image image; try { - Geometry geo; + Geometry geo,output; image.read(Filename); geo = image.size(); int w = geo.width(); int h = geo.height(); if (height != h || width != w) { + output = Geometry(width, height); + output.aspect(1); switch (EnigmaConfig.resizeImages) { case 0: - image.sample(Geometry(width, height)); + image.sample(output); break; case 1: - image.scale(Geometry(width, height)); + image.scale(output); break; case 2: - image.zoom(Geometry(width, height)); + image.zoom(output); break; default: esyslog("ERROR: unknown resize mode %d", EnigmaConfig.resizeImages);