ALT Linux repositórios
Group :: Gráficos
RPM: xli
Main Changelog Spec Patches Sources Download Gear Bugs e FR Repocop
Patch: 160-disable-libjpeg-scaling.patch
Download
Download
This patch changes xli to no longer try to use libjpeg's scaling
functionality, handling zooming JPEGs like any other image type.
It seems there was a regression in libjpeg's scaling functionality
between libjpeg62 and libjpeg8, see: http://bugs.debian.org/677113
Index: xli-1.17.0+20061110/jpeg.c
===================================================================
--- xli-1.17.0+20061110.orig/jpeg.c
+++ xli-1.17.0+20061110/jpeg.c
@@ -248,20 +248,6 @@ Image *jpegLoad(char *fullname, ImageOpt
if (verbose)
describe_jpeg(&cinfo, fullname);
- if (image_ops->iscale > 0 && image_ops->iscale < 4) {
- cinfo.scale_num = 1;
- cinfo.scale_denom = 1 << image_ops->iscale;
- } else if (image_ops->iscale_auto) {
- image_ops->iscale = 0;
- while (image_ops->iscale < 3 && (cinfo.image_width >>
- image_ops->iscale > globals.dinfo.width * .9 ||
- cinfo.image_height >> image_ops->iscale >
- globals.dinfo.height * .9))
- image_ops->iscale += 1;
- cinfo.scale_denom = 1 << image_ops->iscale;
- if (verbose)
- printf("auto-scaling to 1/%d\n", cinfo.scale_denom);
- }
znocache(zfp);
jpeg_start_decompress(&cinfo);
@@ -288,8 +274,6 @@ Image *jpegLoad(char *fullname, ImageOpt
}
image->gamma = RETURN_GAMMA;
- if (cinfo.scale_denom > 1)
- image->flags |= FLAG_ISCALE;
rowbytes = cinfo.output_width * cinfo.output_components;
assert(image->pixlen * image->width == rowbytes);