Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
  • Sign in / Register
  • inkscape inkscape
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 1,529
    • Issues 1,529
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 136
    • Merge requests 136
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Inkscape
  • inkscapeinkscape
  • Merge requests
  • !2339

Add command line option --export-png-color-mode for setting bit-depth and color-type

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Rainer Schwarze requested to merge RainerSchwarze/inkscape:feature-export-option-colormode into master Sep 22, 2020
  • Overview 28
  • Commits 3
  • Pipelines 4
  • Changes 8

A command line option is added (--export-png-color-mode) which resembles the export dialog's "Bit depth" setting. (Gray_1, Gray_2, ..., RGB_8, ..., RGBA_8, etc.)

Note that the dialog says "Bit depth", but internally this splits into "bit depth" and "color type". I chose the name "color-mode" to stay away from both parameters, not sure, whether there is a more appropriate name.

Similar to the code in dialog/export.cpp I map the array of valid options for color-mode to values for bit-depth and color-type. The actual arrays are copy&pasted from there.

The code style pipeline complains. (0,0,0 -> 0, 0, 0 and also the placement of "void export_png_color_mode" on different lines)

Should "void export_png_color" (in actions-output.cpp) be styled as the similar functions above it (so void on one line and function name on next) or according to the suggested corrections from the style check (same line)?

Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: feature-export-option-colormode