Bug 43715 - Impress: presentation minimizer not reduces resolution of images (regression after 3.3)
Summary: Impress: presentation minimizer not reduces resolution of images (regression ...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
3.4.4 release
Hardware: x86 (IA32) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: BSA
Keywords: preBibisect, regression
Depends on:
Blocks: Image-DPI
  Show dependency treegraph
 
Reported: 2011-12-11 06:09 UTC by Vincent Mabillot
Modified: 2019-06-03 02:49 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
A presentation impossible to reduce (2.56 MB, application/vnd.oasis.opendocument.presentation)
2012-03-23 07:25 UTC, Vincent Mabillot
Details
test presentation for experiment with minimizer (47.59 KB, application/vnd.oasis.opendocument.presentation)
2012-06-05 05:03 UTC, sasha.libreoffice
Details
Before Minimizing (517.26 KB, application/vnd.oasis.opendocument.presentation)
2012-06-05 07:50 UTC, Vincent Mabillot
Details
After Minimizing (Nov.2011) (226.28 KB, application/vnd.oasis.opendocument.presentation)
2012-06-05 07:53 UTC, Vincent Mabillot
Details
This presentation will be only half minimized (5.98 MB, application/vnd.oasis.opendocument.presentation)
2015-07-18 18:17 UTC, Jean-Baptiste Faure
Details
This presentation will be completely minimized (5.96 MB, application/vnd.oasis.opendocument.presentation)
2015-07-18 18:18 UTC, Jean-Baptiste Faure
Details
Insert photo to minimize (39.74 KB, image/jpeg)
2016-03-18 16:34 UTC, marco.jj
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vincent Mabillot 2011-12-11 06:09:09 UTC
When I try to minimize a presentation, I could change each options, there's no reduction of the siez.
The presentation wizard tell me that my presentation 3,5Mo will be reduce to 1,1 Mo but at the end it still 3,5 Mo.

              
Browser: Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0 Iceweasel/5.0
Comment 1 sasha.libreoffice 2012-03-22 10:39:23 UTC
Thanks for bugreport
Please, verify if in last version of LibreOffice still reproducible
Comment 2 Vincent Mabillot 2012-03-23 07:25:18 UTC
Created attachment 58929 [details]
A presentation impossible to reduce

Nothing change with this presentation (I'll could attach other presentations if you want) Original : 2.6 Mo  projector presentation minimizing : 2.5Mo
Comment 3 sasha.libreoffice 2012-03-23 09:18:20 UTC
Thanks for attachment
I see that this presentation is initially compressed. So impossible reduce it's size again. Presentation minimizer intended for those user who places pictures directly from PhotoCamera (8 Megapixel) or Scanner into presentation. Then minimizer reduces size of file from 100 MB to 5 MB for example.

Problem is in another: why it shows estimates size of result without investigating of internals of presentation? In this case it estimates to obviously wrong result.

More simple solution: remove size estimation at all.
More complex: analysis of presentation before show resulting size
Comment 4 Vincent Mabillot 2012-03-26 00:35:00 UTC
I think the more complex solution is better but a warning message could prevent users.
Comment 5 Vincent Mabillot 2012-06-04 06:39:35 UTC
(In reply to comment #4)
> I think the more complex solution is better but a warning message could prevent
> users.

I try again to reduce the presentation (the same as in the attachement with a fresh 3.5.4 but nothing change.

Previously (month and month ago), when I used presentation minimizer, the reduction is not only a defintion reduction for pictures but a resolution reduction too.

Now, the endless size of a pictures is the same as the size of the original (source)picture. Before, the minimizer reduced the size of the picture to the size in the presentation. 

Example if I use a source with a 1024x768 picture and reduced its appearance to 640x480 in my presentation, if I try the function "restore original size", with the old minimizer extension, the size stay to 640x480 but now, using the same functionnality, the size is the original size 1024x768. 

I think it's the reason why the estimated size is wrong, because the pictures waqsn't resize to presentation's dimensions.
Comment 6 sasha.libreoffice 2012-06-05 00:38:35 UTC
Thanks for additional testing. I tried to reproduce bug from previous comment, but can not find, where to specify screen resolution in Impress. For example 1027x768 or 640x480. Please, tell where it is in Impress or attach screenshot of settings.
Comment 7 Vincent Mabillot 2012-06-05 03:53:35 UTC
Sorry the example of resolution... They made a new misinterpretation. It's not screen resolution but picture resolution.

I'll maybe used example such as the picture size 600x300 reduced freehand to 300x150 in the presentation...
Comment 8 sasha.libreoffice 2012-06-05 05:03:29 UTC
Created attachment 62576 [details]
test presentation for experiment with minimizer
Comment 9 sasha.libreoffice 2012-06-05 05:07:55 UTC
Indeed, not minimizes. May be minimizer thinks that 1024x768 is already too small to minimize? I not experimented with big pictures.

If this functionality has working in previous version, it is important to determine, it which version. At least approximately.
Comment 10 Vincent Mabillot 2012-06-05 07:50:22 UTC
Created attachment 62587 [details]
Before Minimizing
Comment 11 Vincent Mabillot 2012-06-05 07:53:09 UTC
Created attachment 62588 [details]
After Minimizing (Nov.2011)

This is a minimized presentation (I think with a 3.3 version in november)
Comment 12 sasha.libreoffice 2012-06-05 22:50:45 UTC
Thanks for attachment. Presentation was minimized in 2011-11-14
on LibreOffice/3.3$Linux LibreOffice_project/330m19$Build-8
So, regression happens somewhere between 3.3 and 3.5
Comment 13 Vincent Mabillot 2012-06-06 00:42:35 UTC
Hope it could help to solve it
Comment 14 Vincent Mabillot 2012-06-06 00:46:34 UTC
I think the regression happened beetween 3.3 and 3.4.4 (see the history of the bug).

It maybe appeared when minimizer was include in the pack.

In my memories : Before I installed the extension directly from libre office extension manager after downloaded from openoffice extension repository.
Comment 15 Julien Nabet 2012-11-01 08:20:25 UTC
On pc Debian x86-64 with master and 3.6 sources both updated yesterday, I could minimize the presentation.
I noticed this kind of logs:
 warn:legacy.osl:10929:1:/home/julien/compile-libreoffice/libo/xmloff/source/draw/shapeexport.cxx:719: XMLShapeExport::exportShape(), exception caught!

MagicVince: could you give a try to a newer LO version (3.5.7 or 3.6.2)?
Comment 16 sasha.libreoffice 2012-11-01 08:41:21 UTC
Experimented with second attachment in 3.6.2 on RFR 17 64bit
The same result. After minimizing picture remains 1024x768pixels, though it takes small part of slide in presentation, therefore it's resolution should be reduced.
Comment 17 Julien Nabet 2012-11-01 09:42:07 UTC
Thank you Sasha for your feedback, I tested your attachment (https://bugs.freedesktop.org/attachment.cgi?id=62576) and reproduced the problem on master sources.
Comment 18 Michael Meeks 2012-12-18 15:48:09 UTC
Compression is based on a DPI calculation:

                                const double fSourceDPIX = ((double)aSourceSizePixel.Width / ((double)aLogicalSize.Width / 2540.0 ));
                                const double fSourceDPIY = ((double)aSourceSizePixel.Height/ ((double)aLogicalSize.Height/ 2540.0 ));

                                // check, if the bitmap DPI exceeds the maximum DPI
                                if( ( fSourceDPIX > rGraphicSettings.mnImageResolution ) || ( fSourceDPIY > rGraphicSettings.mnImageResolution ) )

Might be good to run through the sdext/source/minimizer/impoptimizer.cxx (ImpCompressGraphic) method in a debugger for this image and see what is going on.

Potentially there might be some horror mapmode problem causing grief. I need to re-build with the extension enabled to do more it seems.
Comment 19 Robinson Tryon (qubit) 2013-10-19 00:25:10 UTC Comment hidden (obsolete)
Comment 20 Jean-Baptiste Faure 2013-10-19 07:12:09 UTC
In fact Presentation Minimizer fails to reduce pictures that are added in a slide with the layout "Title, Content" by clicking on the "Insert Picture" button which is _in the slide_.
If you insert a picture in a slide with the layout "Blank slide" using the button "From File" which is _in the toolbar_, then Presentation Minimizer reduces this picture without problem.

Steps to reproduce:
You need 2 (different) pictures, for example 2 photos, size ~3 MB each.
1/ create a new empty presentation
2/ chose the layout "Blank Slide"
3/ in the toolbar Drawing click on the button "From File", choose the first picture
4/ add a new slide and click on the layout "Title, Content"
5/ in the center on this new empty slide you have a button with 4 actions; click on "Insert Picture" and choose the second picture
6/ save your presentation
7/ menu Tools > Minimize Presentation...
8/ choose the options which give the smallest size (default options for Screen Optimized)
9/ Presentation Minimizer says that the file size will reduce from ~ 6 MB to ~2 MB or less
10/ launch the minimization
You get a file with size ~ 3 MB. If you examine the minimized presentation you will see that only the first picture has been reduced. You can verify that by opening the file with your preferred archiver software (rename the .odp in .zip before).

Tested today in the master (Build ID: 8998a84f2a45f099981183fc7c6ba1d16a744414 after the de-extension-alization of Presentation Minimizer) and in LO 4.1.4.0.0+.

Best regards. JBF
Comment 21 Joel Madero 2013-10-29 21:11:50 UTC
Hm - I don't have presentation minimizer under Tools . . . was this removed in 4.1.2? I get it in bibisect package though and it seems like it never worked correctly since it was incorporated into core. Removing bibisectrequest as it's not useful in this situation
Comment 22 Julien Nabet 2013-10-29 21:40:26 UTC
Joel: on pc Debian x86-64 with 4.1 sources updated some days ago, I got "Minimize Presentation" on Tools (of course in Impress).
Comment 23 Joel Madero 2013-10-29 21:50:38 UTC
Very weird - my 4.1.2.3 release and my master build (from just a few days ago) both don't have it under tools. What in the world - oh well, different issue I suppose. The important thing is bibisect isn't useful here - seems like it's been broken since the first introduction into our core code (no clue about when it was "just an extension")
Comment 24 Julien Nabet 2013-10-29 21:52:24 UTC
Joel: I forgot to say I got this in my autogen.input:
--enable-ext-presenter-minimizer
Comment 25 Joel Madero 2013-10-29 21:54:15 UTC
ah there's the answer ;) But it seems like it was taken out of the debian package at least from the Ubuntu ppa
Comment 26 retired 2014-12-17 09:27:57 UTC
What's up with this? Can someone post exact repro steps? Where is presentation minimizer. Everyone seems to know - nevertheless exact steps would be great.

Would be great to know where to even start when trying to reproduce.

Is this persisting with LO 4.4b2?
Comment 27 QA Administrators 2015-07-18 17:36:07 UTC Comment hidden (obsolete)
Comment 28 Jean-Baptiste Faure 2015-07-18 18:09:54 UTC
(In reply to foss from comment #26)
> What's up with this? Can someone post exact repro steps? Where is
> presentation minimizer. Everyone seems to know - nevertheless exact steps
> would be great.
> 
> Would be great to know where to even start when trying to reproduce.
> 
> Is this persisting with LO 4.4b2?

Nothing changed in LO 4.4.6.0+ and LO 5.0.1.0+
Steps to reproduce : see comment #20
Presentation Minimizer is available in Impress under menu Tools > Minimize Presentation...

Best regards. JBF
Comment 29 Jean-Baptiste Faure 2015-07-18 18:17:07 UTC
Created attachment 117313 [details]
This presentation will be only half minimized
Comment 30 Jean-Baptiste Faure 2015-07-18 18:18:46 UTC
Created attachment 117314 [details]
This presentation will be completely minimized
Comment 31 marco.jj 2016-03-18 16:34:58 UTC
Created attachment 123696 [details]
Insert photo to minimize

The Impress tool "minimize presentation" don't work in this condition:

- when i insert the photo by new presentation sheet (see in the attachment).
When the tool try to remove the original image after compression they was locked, i think (only image inserted by a button in the center of a new sheet).

else, if i paste photo from memory or use "image" button or in menù "insert/image" the compression work correctly.
Comment 32 Xisco Faulí 2016-09-20 16:10:35 UTC
Adding keyword 'bibisectRequest' to see whether this regression is already present in the oldest build of bibisect-43all repository or not.
In case it's already present, change 'bibisectRequest' to 'preBibisect'.
Otherwise, change 'bibisectRequest' to 'bibisected' and add a comment with the output from 'git bisect log'
Comment 33 Xisco Faulí 2017-09-29 08:52:54 UTC Comment hidden (obsolete)
Comment 34 Jean-Baptiste Faure 2017-10-28 16:26:09 UTC
Still reproducible with LO 5.4.2 on test files from comment #29 and #30.

Best regards. JBF
Comment 35 QA Administrators 2019-06-03 02:49:10 UTC
Dear MagicVince,

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information from Help - About LibreOffice.
 
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not 
appropriate in this case)


If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from http://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword


Feel free to come ask questions or to say hello in our QA chat: https://kiwiirc.com/nextclient/irc.freenode.net/#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-UntouchedBug