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
  • extensions extensions
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 77
    • Issues 77
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 16
    • Merge requests 16
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Inkscape
  • extensionsextensions
  • Issues
  • #366
Closed
Open
Created May 19, 2021 by CRogers@CRogersOwner

Default to white to replace transparency in JPEG export

By default, jpegs exported on a transparent background have the transparency converted to black. I can't imagine the reasoning for this, but since most of the time the canvas in Inkscape is white, it seems a good idea to default to white.

Here's a link to the issue and how to solve it programatically: https://stackoverflow.com/questions/50739732/how-to-covert-png-to-jpeg-using-pillow-while-image-color-is-black

@doctormo also gives the following hints:

"Just remember that in raster_export_jpg.py that self.img is the same thing as im in the above example."

"pars.add_argument("--fill_color", type=inkex.Color, default=inkex.Color(1364325887))"

"then you can just do list(self.option.fill_color.to('rgb')) which gives you to the RGB compatible with the above."

Edited May 19, 2021 by CRogers
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking