Bug 75742 - Scaled down images in KOffice documents are extremely blurry
Summary: Scaled down images in KOffice documents are extremely blurry
Status: RESOLVED FIXED
Alias: None
Product: koffice
Classification: Applications
Component: general (show other bugs)
Version: 1.3
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: KOffice Bug Wranglers
URL:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2004-02-21 00:44 UTC by Dik Takken
Modified: 2009-08-11 15:10 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dik Takken 2004-02-21 00:44:06 UTC
Version:           1.3 (using KDE KDE 3.2.0)
Installed from:    Compiled From Sources
OS:          Linux

Scaled down images in KOffice documents are extremely blurry. This is especially well visible when using images of scanned text, or screenshots. A more precise algorithm is needed.

Also, it looks like the scaling of images is re-applied every time the image needs to be re-drawn on the screen. A scaled version of the image should be created and cached when the image is inserted into the document. The scaled version only needs to be re-calculated when the image is resized, or the user zooms in on the document. Ideally, these calculations should be done in a seperate thread.
Comment 1 Thomas Zander 2004-02-22 11:36:30 UTC
In KWord I much rather have but-ugly scaling pictures that are on screen in no-time then a nice looking slow image.
In KPresenter (for example) this assumption is totally wrong.
Which application do you have problems with?

Your suggestion to save a scaled image is not very nice since scaling an image down and then up means you lost a lot of information.  I'd rather have it be a bit slow as it loosing quality for ever.
Comment 2 Dik Takken 2004-02-22 15:38:12 UTC
The scaling could be done in a separate thread. KOffice should first generate a fast-but-ugly version. When it gets the time to do so, a more refined version could be created. 

About your concern of loosing information: You never loose information. KOffice will always have to keep the original image embedded in the document. The image that is used for on-screen display is derived from the original image. No information loss whatsoever.

Comment 3 Nicolas Goutte 2004-02-22 16:23:52 UTC
On Saturday 21 February 2004 00:44, Dik Takken wrote:
> ------- You are receiving this mail because: -------
> You are the assignee for the bug, or are watching the assignee.
>
> http://bugs.kde.org/show_bug.cgi?id=75742
>            Summary: Scaled down images in KOffice documents are extremely
>                     blurry
>            Product: koffice
>            Version: 1.3
>           Platform: Compiled Sources
>         OS/Version: Linux
>             Status: UNCONFIRMED
>           Severity: normal
>           Priority: NOR
>          Component: general
>         AssignedTo: koffice kde org
>         ReportedBy: takken phys uu nl
>
>
> Version:           1.3 (using KDE KDE 3.2.0)
> Installed from:    Compiled From Sources
> OS:          Linux

What application are you talking about. KWord and KPresenter are using 
KoPicture, while other programs do not.

>
> Scaled down images in KOffice documents are extremely blurry. This is
> especially well visible when using images of scanned text, or screenshots.

In fast mode or also in slow mode. Fast mode is applied in KWord when 
resizing. Slow mode is used when needed (for example printing.)
As for KPresenter, slow mode is always used.

> A more precise algorithm is needed.

We use Qt's.

>
> Also, it looks like the scaling of images is re-applied every time the
> image needs to be re-drawn on the screen. A scaled version of the image
> should be created and cached when the image is inserted into the document.
> The scaled version only needs to be re-calculated when the image is
> resized, or the user zooms in on the document. Ideally, these calculations
> should be done in a seperate thread.

KWord and KPresenter do cache and only resize when needed (+ printing.)

(...)

Have a nice day!

Comment 4 Dik Takken 2004-02-22 17:35:45 UTC
> What application are you talking about. KWord and KPresenter are using 
> KoPicture, while other programs do not.

I am talking about KPresenter and KWord. 

> In fast mode or also in slow mode. Fast mode is applied in KWord when 
> resizing. Slow mode is used when needed (for example printing.) 
> As for KPresenter, slow mode is always used. 

That's odd. In KPresenter, on-screen images look real bad. Also when you generate a HTML slideshow, the images are very blurry. Only when I generate a print-preview it looks OK.

KWord and KPresenter do cache and only resize when needed (+ printing.)

Odd. When you insert a picture in a KPresenter slide, scrolling the slide gets very slow. It looks like KPresenter has to work real hard to scroll slides up and down. Even if the slide only contains one image of 800x500 resolution.
Comment 5 Nicolas Goutte 2004-02-23 12:01:29 UTC
To avoid misunderstandings: what kind of pictures are they? (Not EPS files I suppose.) Are they big pictures? Are they many?

As for slowness, that can unfortunately happen, as otherwise we have a problem with the X-Window server. (That are things that would be better to be tried to be optimized again once KOffice will run on Qt4.)

Have a nice day!
Comment 6 Dik Takken 2004-02-23 12:11:03 UTC
I'm just trying to create a photo slideshow for publishing on the web. I use one 800x500 JPG image per slide, and some text comments. The slowdown does not depend on the number of slides in the slideshow, it's already slow with just one slide. 

It seems like I will have to upload it in PDF, for the sake of sharpness. Oh no, that don't work either. The slides run off the pages... That's another bug report :)
Comment 7 Dik Takken 2004-02-24 16:22:53 UTC
I found that when I choose a scale unequal to 100% in the KPresenter HTML export dialog, the images are *much* sharper. I will submit a separate bugreport about that.

Comment 8 Michael Leupold 2008-10-26 15:16:18 UTC
What's the status of this bug? I rechecked in trunk r875799 and it seems that the image is currently not recalculated on scaling. Is it worth keeping this bug regarding that the underlying technique (flake shapes) changed a lot lately? If it's to be kept, should it be reassigned?
Comment 9 Thomas Zander 2008-10-26 18:47:39 UTC
I added no-loss images in koffice some time ago, a quick check shows that this was broken again since.

Not sure if I should close the bug until the functionality has actually been restored again.
Comment 10 Thomas Zander 2009-08-11 15:10:34 UTC
The no-loss images and fast scaling etc is going to be in 2.1, which closes this bug.