Python Forum
Save JPG as Line Art
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Save JPG as Line Art
#1
I am writing this program to generate a line that will engrave on a lazer. Currently it is generating an image that is a JPG. This will work with my laser but it will raster engrave instead of cut all the way through, this is because it contains pixels. I need my image to be a line art, not pixels, so that it will cut all the way through. How can I convert my JPG to line art or save the image as line art from the start?

image1 = Image.new("RGB", (Width, Height), white)
draw = ImageDraw.Draw(image1)

draw.line([x+2, z1+2, x+3, z1+3], self.color.get(), int(0.001))

name = filedialog.asksaveasfile(defaultextension=".jpg", filetypes=(("Image", "*.jpg"), ("PNG", "*.png")))

if name != "None":
    image1.save(name)
Reply
#2
I am trying to use SVG, is this a good approach?
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  [Tkinter] [split] I want to add a code to the "Save" button to save the data entered LOO 1 1,954 Jan-23-2023, 05:31 PM
Last Post: deanhystad
  Save image from Clipboard Linux / save Pixbuf format M_Schneider 1 2,841 May-04-2018, 04:38 PM
Last Post: woooee

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020