Bug 56468

Summary: EDITING: image rescaling method should be configurable
Product: LibreOffice Reporter: csongor
Component: WriterAssignee: Not Assigned <libreoffice-bugs>
Status: NEW --- QA Contact:
Severity: enhancement    
Priority: medium CC: bugs, fran2012, gokcen.eraslan, kendy, quikee, timar74
Version: 3.5.4 release   
Hardware: All   
OS: All   
Whiteboard: BSA
i915 platform: i915 features:
Attachments: a simple document containig an enlarged 60x60 png image to illustrate the blurring effect

Description csongor 2012-10-27 17:39:53 UTC
Created attachment 69160 [details]
a simple document containig an enlarged 60x60 png image to illustrate the blurring effect

Problem description: 

Steps to reproduce:
1. create a 60x60 QR code of an URL in png format (for example on the web site http://goqr.me/)
2. insert the png image into a Writer document
3. rescale it by dragging its green drag points to fill almost the whole width of the A4 page

Current behavior: The huge pixels become blurred.

Expected behavior: Pixels should preserve their edge. Even better would be to set for each individual image it's rescale method:
- pixel resize
- bilinear rescaling
- bicubic rescaling
- appliying lanczos filter
- etc.

(I wanted to file this idea as a feature request but I did not know how and where to send FRs instead of bug reports. :))



Platform (if different from the browser): 
              
Browser: Mozilla/5.0 (Windows NT 5.1; rv:16.0) Gecko/20100101 Firefox/16.0
Comment 1 Roman Eisele 2012-10-27 18:37:18 UTC
Thank you for your report!

IMHO this is a valid and very reasonable feature/enhancement request, therefore set Status to NEW.


> (I wanted to file this idea as a feature request but I did not know how and
> where to send FRs instead of bug reports. :))

That’s simple ;-) : just do what you did (file a bug), but set the ”Importance” field of the bug report to “enhancement”. (If this is not possible directly in the bug submission assistant, do it finally on the bugzilla page.)
Comment 2 Roman Eisele 2012-10-27 18:42:58 UTC
@ Kendy and Tomaz Vajngerl:

Hi Kendy, hi Tomaz,

you have done some important improvements to the image resampling/interpolation code in LibreOffice. Do you see any chance to implement this enhancement request (adding an UI for choosing the interpolation/rescale methode), at least partially? This would be a big progress, also in comparison to MS Office ... So please consider this.

Thank you very much!
Comment 3 Tomaz Vajngerl 2013-02-26 21:15:27 UTC
Hi,

I can now offer you a workaround for this. In LO 4.0 I added "Compress Graphic" function to Draw, Impress and Calc. In master (to be 4.1) it is also available in Writer. With "Compress Graphic" you are now able to actually resize the picture to current "view" size (this is the default) and if the picture is smaller it will enlarge it. In "Compress Graphic" you have the possibility to choose the interpolation method. If you select "None" the QR code in the example document will become sharp. This is not the exact solution to this problem but I think it is a easy workaround.

Regards, Tomaž
Comment 4 Nicolas R 2013-05-16 09:09:17 UTC
(In reply to comment #3)
> Hi,
> 
> I can now offer you a workaround for this. In LO 4.0 I added "Compress
> Graphic" function to Draw, Impress and Calc. In master (to be 4.1) it is
> also available in Writer. With "Compress Graphic" you are now able to
> actually resize the picture to current "view" size (this is the default) and
> if the picture is smaller it will enlarge it. In "Compress Graphic" you have
> the possibility to choose the interpolation method. If you select "None" the
> QR code in the example document will become sharp. This is not the exact
> solution to this problem but I think it is a easy workaround.
> 
> Regards, Tomaž

Real great improvement, because imho it was a great lack regarding MsO (in our compagny many users create "composite" text documents with writer).
Any chances to have "compress graphic" menu in writer backport to 4.0 branch, or is it technically a tough work ?
Comment 5 Tomaz Vajngerl 2013-05-21 11:55:01 UTC
Hi,

In 4.1 it is also possible to compress images in Writer. I have some ideas how to improve this functionality but this will have to wait until 4.2. 

Known bugs or missing features:
- ability to remove cropped areas
- apply button (or any other action) to see the visual result of compression without leaving the dialog
- DPI calculation of cropped images is not working correctly
- ability to compress all images in the document (only DPI makes sense in this scenario)
- warnings or limitations on actions that don't make sense (for example compression of vector image will produce a bitmap image, if the size of the compressed image is greater than the original)

Other suggestions are welcome.

Regards, Tomaž
Comment 6 Tomaz Vajngerl 2013-05-21 12:01:58 UTC
(In reply to comment #5)
> Hi,
> 
> In 4.1 it is also possible to compress images in Writer. I have some ideas
> how to improve this functionality but this will have to wait until 4.2. 
> 
> Known bugs or missing features:
> - ability to remove cropped areas
> - apply button (or any other action) to see the visual result of compression
> without leaving the dialog
> - DPI calculation of cropped images is not working correctly
> - ability to compress all images in the document (only DPI makes sense in
> this scenario)
> - warnings or limitations on actions that don't make sense (for example
> compression of vector image will produce a bitmap image, if the size of the
> compressed image is greater than the original)
> 
> Other suggestions are welcome.
> 
> Regards, Tomaž

Ups..

Disregard this comment - it was meant for bug [1]. Sorry!

Backport to 4.0 branch can be problematic. I will analyze if it didn't change too much.

[1]: https://bugs.freedesktop.org/show_bug.cgi?id=34133
Comment 7 Nicolas R 2013-05-22 12:22:54 UTC
(In reply to comment #6)

> > - ability to compress all images in the document (only DPI makes sense in
> > this scenario)
> 
> Ups..
> 
> Disregard this comment - it was meant for bug [1]. Sorry!

No, no, no ... no disregard. Really interesting ideas , especially, imho, ability to compress  all images in "one click". This feature is a real lack  for some users in our company (comparing with Word). They "love" to include many pictures in their documents ...
> 
> Backport to 4.0 branch can be problematic. I will analyze if it didn't
> change too much.
> 

Ok! If I dare : don't waste to much time on this backport and stay focused on your improvements ideas... ;-)

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.