Audacity Bug Summary
••• Introduction •••
••• Keywords •••
    Audacity 3.0.3 development began 19th April 2021

Audacity Bugzilla



Bug 757 - Enh: Reduce image size in dumped Manual
Enh: Reduce image size in dumped Manual
Status: RESOLVED FIXED
Product: Audacity
Classification: Unclassified
Component: Scripts
unspecified
Per OS All
: P4 Enhancement
Assigned To: Default Assignee for New Bugs
: mw2html
Depends on:
Blocks: 381
  Show dependency treegraph
 
Reported: 2014-09-22 00:00 UTC by Gale Andrews
Modified: 2018-08-20 11:45 UTC (History)
5 users (show)

See Also:
Steps To Reproduce:
The manual contains at least 16Mb of images, which could be reduced very significantly with no visible loss of image quality.
Release Note:
First Git SHA:
Group: ---
Workaround:
Closed: 2018-08-20 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gale Andrews 2014-09-22 00:00:02 UTC
The 2.0.6 Manual will be over 20 MB (unzipped) with over 16 MB of that
size in images, so colour reduction of images to reduce their size is
worth doing.

Very few (if any) of the images in the Manual require more than 64 
colours if dither is used. Those that are currently 256 colour PNG 
can be reduced to around 50% of their current size by reducing the
number of colours to 64.

Steps were written at
http://wiki.audacityteam.org/w/index.php?title=Create_Local_Manual&oldid=20791#Unused.2Foptional_step

to use ImageMagick to reduce colour size but the processing has
to be done every time the off-line Manual is created and the steps
do not necessarily work identically on all platforms. 

This bug is to track a better solution to the issue, such as running
ImageMagick on the images already on the server, and perhaps using 
an upload file script that reduces image size before new images reach   
the server.

The issue can't really be actioned if it was logged in the Manual
Wiki so placed here in the "scripts" component with "mw2html" keyword.
Comment 1 James Crook 2014-09-22 05:24:07 UTC
In the past manually uploading reduced versions of the five 'worst offenders'  has made a worthwhile/significant difference.

My preferred solution is to address the 'steps do not necessarily work identically on all platforms' issue.  We have to run mw2html every time we fetch the manual, so we could make a python script for the image reduction step and connect it with the fetching.

I have changed the type of bug from 'repeatable' to 'enhancement'. We are not in the state 'identify root cause'.  

Extreme idea: When scripting in audacity has been improved, we could even get audacity to generate many of the screenshots.  This could be called from the installer, and would (a) eliminate the need to ship many of the images at all (b) make the images custom to the platform, e.g. mac/linux/windows.  It's not a good use of effort for the (say) 10Mb reduction in download size, but might possibly be worth it for other reasons.  Regenerating all the screenshot images in the manual would be a good test suite for some aspects of Audacity.
Comment 2 James Crook 2016-07-15 09:03:02 UTC
Added 'Enh:' to summary line.
Comment 3 James Crook 2017-08-18 10:26:52 UTC
There is a new potentially very easy way to do this.

Our wiki is now served via Cloudflare.  Cloudflare offer an option, called Polish, which offers lossy compresses of images with minimal loss of image quality.  If we enable that for cloudflare, we will automatically be fetching smaller images when we pull the manual.  So that would be a zero programming solution.
Comment 4 James Crook 2017-08-30 11:07:50 UTC
Buanzo enabled CloudFlare polish in lossless mode.

Prior to zipping:

2.1.3 manual without 'polish' we had 719 image files and 18.1Mb
2.2.0 alpha with 'polish' enabled we have 828 image files and 11.2Mb

The additional 100 or so image files are mostly from extra menus.  We also have new images for new features such as themes and stem plots.  Polish seems to be reducing image size by about 53% relative to the unprocessed .png format.  We could get a further reduction by enabling lossy mode, probably with no visible deterioration.


RESOLVED FIXED