Skip to content

JPG quality keyword in savefig #458

Closed
@fkbreitl

Description

@fkbreitl

Hi,

I want to change the JPEG compression ration in savefig.
There seem to be an undocumented extra keyword arguments as pointed at the matplotlib-devel list, but they don't have an effect:

         *quality*: The image quality, on a scale from 1 (worst) to
             95 (best). The default is 75. Values above 95 should
             be avoided; 100 completely disables the JPEG
             quantization stage.

         *optimize*: If present, indicates that the encoder should
             make an extra pass over the image in order to select
             optimal encoder settings.

         *progressive*: If present, indicates that this image
             should be stored as a progressive JPEG file.

I am using the GTKAgg backend. I also tried the Agg backend but JPG was not supported with this.

I would like to have a proper documentation at http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.savefig and an implementation that works.

Cheers

Frank

Metadata

Metadata

Assignees

No one assigned

    Labels

    Difficulty: Easyhttps://matplotlib.org/devdocs/devel/contribute.html#good-first-issuesDocumentationGood first issueOpen a pull request against these issues if there are no active ones!New feature

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions