Summary: | zoom / autofit mode results in garbled display of image | ||
---|---|---|---|
Product: | [Applications] digikam | Reporter: | alfons.hoogervorst |
Component: | ImageEditor-Canvas | Assignee: | Digikam Developers <digikam-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | 7.6.0 |
Description
alfons.hoogervorst
2005-04-07 19:53:21 UTC
CVS commit by pahlibar: reverting patch (bringing back hack). problem in imlib2 (see bug# 100894). remove when imlib2 is fixed. BUGS: 103445 M +16 -0 imlibinterface.cpp 1.48 --- kdeextragear-3/digikam/utilities/imageeditor/imlibinterface.cpp #1.47:1.48 @@ -495,6 +495,22 @@ void ImlibInterface::paintOnDevice(QPain imlib_context_set_color_modifier(d->cmod); + if (d->zoom == 1.0) + { + // this hack is needed because imlib2 renders image incorrectly + // if zoom == 1 and an unmodified colot modifier is applied + Imlib_Image tmp = + imlib_create_cropped_scaled_image(sx, sy, sw, sh, dw, dh); + if (tmp) + { + imlib_context_set_image(tmp); + imlib_render_image_on_drawable(dx, dy); + imlib_free_image(); + } + } + else + { imlib_render_image_part_on_drawable_at_size(sx, sy, sw, sh, dx, dy, dw, dh); + } imlib_context_pop(); |