Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


Hi,

Now that we have higher quality scaling algorithms on Bitmap, which
are used for PDF export, I wanted to do the same in the GUI. I
discovered that "grfmgr" is responsible for scaling when displaying
images on the GUI, but it has its own functions for scaling. So I
started to work on removing the scaling used in grfmgr and use
Bitmap::Scale instead. Meanwhile Luboš Luňák enabled Bitmap::Scale
(baca49fdda5e350b7b0f122d50739ee98cc6fe25) in a similar way I did at
first, but this solution does not work well when zooming and the image
must actually be croped to the display rectangle first. I have
addressed this issue in commit
764525b39c78bfad1f6fc44a8517a565547f67cf, cleaned up the CreateOutput
function and have additionally removed the scaling found in "grfmgr".

There are still some issues that I have found and need to be resolved:
- Scaling is not so good when upscaling (can be seen at higher zoom
levels), I need to check this in Bitmap::Scale to improve this.
- Scaling is bad when dealing with transparent images.
- There are some artifacts when rotating an image at arbitrary angles.
- Scaling performance could be better - BMP_SCALE_BOX is faster and
may be better for use on the GUI, however the same path is used for
Export. Another idea is to combine scale and crop to speed up
processing for certain scenarios (zoom).

If someone finds other problems please report them to me. Thanks.

Comments?

Regards,
Tomaž

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.