Feature #1014 ยป mychanges.diff
| bitmap.c | ||
|---|---|---|
|
{
|
||
|
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);
|
||