diff options
| author | Kaalleen <36401965+kaalleen@users.noreply.github.com> | 2024-07-03 07:09:06 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-07-03 07:09:06 +0200 |
| commit | 2b390b908e93a7f6f529b9db624dd0d2c3ca184a (patch) | |
| tree | 569a352d3f5de13d6507ce89938d087a1f9d6ec0 /lib/extensions/png_realistic.py | |
| parent | 6c166dca61e17efbb3173dcf5ef484e3aa739a50 (diff) | |
Raster output (#3036)
* stitch plan preview png: 300, 600 dpi
* add png export dpi option
Diffstat (limited to 'lib/extensions/png_realistic.py')
| -rw-r--r-- | lib/extensions/png_realistic.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/extensions/png_realistic.py b/lib/extensions/png_realistic.py index 24ebce55..e3216efd 100644 --- a/lib/extensions/png_realistic.py +++ b/lib/extensions/png_realistic.py @@ -13,6 +13,12 @@ from .png_simple import write_png_output class PngRealistic(InkstitchExtension): + def __init__(self, *args, **kwargs): + InkstitchExtension.__init__(self) + + self.arg_parser.add_argument('--notebook') + self.arg_parser.add_argument('--dpi', type=int, default=300, dest='dpi') + def effect(self): if not self.get_elements(): return @@ -26,7 +32,7 @@ class PngRealistic(InkstitchExtension): layer = render_stitch_plan(self.svg, stitch_plan, True, visual_commands=False, render_jumps=False) - write_png_output(self.svg, layer) + write_png_output(self.svg, layer, self.options.dpi) # don't let inkex output the SVG! sys.exit(0) |
