svg2gcode 2.4.0__tar.gz → 2.5.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {svg2gcode-2.4.0 → svg2gcode-2.5.0}/PKG-INFO +1 -1
- {svg2gcode-2.4.0 → svg2gcode-2.5.0}/svg2gcode/__init__.py +1 -1
- {svg2gcode-2.4.0 → svg2gcode-2.5.0}/svg2gcode/svg_to_gcode/compiler/_compiler.py +5 -5
- {svg2gcode-2.4.0 → svg2gcode-2.5.0}/LICENSE +0 -0
- {svg2gcode-2.4.0 → svg2gcode-2.5.0}/README.md +0 -0
- {svg2gcode-2.4.0 → svg2gcode-2.5.0}/pyproject.toml +0 -0
- {svg2gcode-2.4.0 → svg2gcode-2.5.0}/svg2gcode/README.md +0 -0
- {svg2gcode-2.4.0 → svg2gcode-2.5.0}/svg2gcode/__main__.py +0 -0
- {svg2gcode-2.4.0 → svg2gcode-2.5.0}/svg2gcode/svg_to_gcode/.DS_Store +0 -0
- {svg2gcode-2.4.0 → svg2gcode-2.5.0}/svg2gcode/svg_to_gcode/__init__.py +0 -0
- {svg2gcode-2.4.0 → svg2gcode-2.5.0}/svg2gcode/svg_to_gcode/compiler/__init__.py +0 -0
- {svg2gcode-2.4.0 → svg2gcode-2.5.0}/svg2gcode/svg_to_gcode/compiler/interfaces/__init__.py +0 -0
- {svg2gcode-2.4.0 → svg2gcode-2.5.0}/svg2gcode/svg_to_gcode/compiler/interfaces/_abstract_interface.py +0 -0
- {svg2gcode-2.4.0 → svg2gcode-2.5.0}/svg2gcode/svg_to_gcode/compiler/interfaces/_fan_controlled_gcode.py +0 -0
- {svg2gcode-2.4.0 → svg2gcode-2.5.0}/svg2gcode/svg_to_gcode/compiler/interfaces/_gcode.py +0 -0
- {svg2gcode-2.4.0 → svg2gcode-2.5.0}/svg2gcode/svg_to_gcode/formulas.py +0 -0
- {svg2gcode-2.4.0 → svg2gcode-2.5.0}/svg2gcode/svg_to_gcode/geometry/__init__.py +0 -0
- {svg2gcode-2.4.0 → svg2gcode-2.5.0}/svg2gcode/svg_to_gcode/geometry/_abstract_chain.py +0 -0
- {svg2gcode-2.4.0 → svg2gcode-2.5.0}/svg2gcode/svg_to_gcode/geometry/_abstract_curve.py +0 -0
- {svg2gcode-2.4.0 → svg2gcode-2.5.0}/svg2gcode/svg_to_gcode/geometry/_circular_arc.py +0 -0
- {svg2gcode-2.4.0 → svg2gcode-2.5.0}/svg2gcode/svg_to_gcode/geometry/_cubic_bazier.py +0 -0
- {svg2gcode-2.4.0 → svg2gcode-2.5.0}/svg2gcode/svg_to_gcode/geometry/_elliptical_arc.py +0 -0
- {svg2gcode-2.4.0 → svg2gcode-2.5.0}/svg2gcode/svg_to_gcode/geometry/_line.py +0 -0
- {svg2gcode-2.4.0 → svg2gcode-2.5.0}/svg2gcode/svg_to_gcode/geometry/_line_segment_chain.py +0 -0
- {svg2gcode-2.4.0 → svg2gcode-2.5.0}/svg2gcode/svg_to_gcode/geometry/_matrix.py +0 -0
- {svg2gcode-2.4.0 → svg2gcode-2.5.0}/svg2gcode/svg_to_gcode/geometry/_quadratic_bazier.py +0 -0
- {svg2gcode-2.4.0 → svg2gcode-2.5.0}/svg2gcode/svg_to_gcode/geometry/_raster_image.py +0 -0
- {svg2gcode-2.4.0 → svg2gcode-2.5.0}/svg2gcode/svg_to_gcode/geometry/_smooth_arc_chain.py +0 -0
- {svg2gcode-2.4.0 → svg2gcode-2.5.0}/svg2gcode/svg_to_gcode/geometry/_vector.py +0 -0
- {svg2gcode-2.4.0 → svg2gcode-2.5.0}/svg2gcode/svg_to_gcode/svg_parser/__init__.py +0 -0
- {svg2gcode-2.4.0 → svg2gcode-2.5.0}/svg2gcode/svg_to_gcode/svg_parser/_parser_methods.py +0 -0
- {svg2gcode-2.4.0 → svg2gcode-2.5.0}/svg2gcode/svg_to_gcode/svg_parser/_path.py +0 -0
- {svg2gcode-2.4.0 → svg2gcode-2.5.0}/svg2gcode/svg_to_gcode/svg_parser/_transformation.py +0 -0
- {svg2gcode-2.4.0 → svg2gcode-2.5.0}/svg2gcode/svg_to_gcode/svg_parser/debug_methods.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: svg2gcode
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.5.0
|
|
4
4
|
Summary: svg2gcode: convert an SVG (Scalable Vector Graphic) image to gcode.
|
|
5
5
|
Keywords: scalable vector graphics,svg,image,laser cutter,laser engraving
|
|
6
6
|
Author-email: Johannes Noordanus <mailjohannes.mailnoordanus@gmail.com>
|
|
@@ -261,7 +261,7 @@ class Compiler:
|
|
|
261
261
|
def convert_image(self, image:str, img_attrib: dict[str, Any]):
|
|
262
262
|
|
|
263
263
|
# get svg image attributes info or default
|
|
264
|
-
pixelsize = img_attrib['gcode_pixelsize'] if 'gcode_pixelsize' in img_attrib else
|
|
264
|
+
pixelsize = img_attrib['gcode_pixelsize'] if 'gcode_pixelsize' in img_attrib else self.settings["pixel_size"]
|
|
265
265
|
|
|
266
266
|
# convert image from base64 string
|
|
267
267
|
img = self.decode_base64(image)
|
|
@@ -275,13 +275,13 @@ class Compiler:
|
|
|
275
275
|
img_background = Image.new(mode = "RGBA", size = img.size, color = (255,255,255))
|
|
276
276
|
img = Image.alpha_composite(img_background, img)
|
|
277
277
|
|
|
278
|
-
# convert image to black&white (without alpha) and new size #reminder: 'img = img.convert("LA")'
|
|
279
|
-
img = img.resize((int(float(img_attrib['width']) * 1/float(pixelsize)),
|
|
280
|
-
int(float(img_attrib['height']) * 1/float(pixelsize))), Image.Resampling.LANCZOS).convert("L")
|
|
281
|
-
|
|
282
278
|
if self.settings['showimage']:
|
|
283
279
|
img.show()
|
|
284
280
|
|
|
281
|
+
# convert image to black&white (without alpha) and new size #reminder: 'img = img.convert("LA")'
|
|
282
|
+
img = img.resize((int(float(img_attrib['width'])/float(pixelsize)),
|
|
283
|
+
int(float(img_attrib['height'])/float(pixelsize))), Image.Resampling.LANCZOS).convert("L")
|
|
284
|
+
|
|
285
285
|
# convert to nparray for fast handling
|
|
286
286
|
return np.array(img)
|
|
287
287
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|