Image to Gcode Converter

Thanks, Victor, for taking a look at this.

I downloaded the 1.2.9 ImageToGcode from Thingiverse… actually all three, same result. I tried it first on my Linux box with Wine… then on my Win7 box. Got the same result both times. ImageToGcode loads fine… but can’t load an JPG image file, either by dragging the image in, or using the “Load Image” button. Dragging simply results in nothing happening. Using “Load Image” allows a file browse/selection window, but results in the following popup when a file is selected.

[attachment file=“Screenshot at 2019-06-26 10-28-37.png”]

[attachment file=“Screenshot at 2019-06-26 10-30-05.png”]

I know Win7 is ancient by today’s standards and I suspect the problem is something “more modern” than Win7 can handle?

The earlier version (1.2.4) I was able to run – here, running on Linux/Wine – was what was out on Thingiverse when we were doing the “Laser engraving – not really getting great results” thread…

[attachment file=“heath.png”]

Again, thanks for all your support.

– David

 

 

 

Screenshot-at-2019-06-26-10-30-05.png

Victor,

I just downloaded from the link you provided and gave it a go… exactly the same result. Sorry… :frowning:

– David

Argh! Silly me… you asked for “details” and I gave you the same screenshots from before.

Just clicked the “Details” button on that pop-up and here’s the entire message…

==================================

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.MissingMethodException: Method not found: ‘System.String System.String.Format(System.IFormatProvider, System.String, System.Object)’.
at ImageToGcode.Form1.loadImage(String path)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

************** Loaded Assemblies **************
mscorlib
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.36470 built by: FX452RTMLDR
CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/mscorlib.dll

ImageToGcode
Assembly Version: 1.2.9.0
Win32 Version: 1.2.9.0
CodeBase: file:///C:/Users/djohnson/Downloads/ImageToGcode_1.2.9.exe

System.Windows.Forms
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.36415 built by: FX452RTMLDR
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll

System.Drawing
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.36415 built by: FX452RTMLDR
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll

System
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.36520 built by: FX452RTMLDR
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll

System.Configuration
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.36415 built by: FX452RTMLDR
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll

System.Xml
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.36430 built by: FX452RTMLDR
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
<system.windows.forms jitDebugging=“true” />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.

I have just tried to run the 1.2.9 on my mac through wine-4.0.1 and it works without problems. Which version of .NET Framework are you using on win 7?

I have just recompiled the app with target .Net framework 4.5, give it a try: https://mega.nz/#!Ft8ilYBb!UvXgmD7I5XDJllnGMX4hWOiQYqfzwA83W0cQLEypr58

It appears to me to be 4.5.2…

[attachment file=“Screenshot at 2019-06-26 12-38-06.png”]

I haven’t run updates in a long time. I’ll go ahead and do that…

 

EDIT: Never mind… I just realized the 2nd link you gave is a repeat of the previous one…

=======================

No joy on trying to download your latest link…

[attachment file=“Screenshot at 2019-06-26 12-47-13.png”]

Oh, please sorry, here is the right link

Hot dog! That seems to have done it. Here’s my remote Win7 desktop with that last version…

[attachment file=“Screenshot at 2019-06-26 14-50-32.png”]

Thank you, Victor!

– David

 

 

Thank you, David! I think I have to add the info about required version of .net in description

1 Like

Adventures in laser-engraving…

First, I want to thank Victor for his really neat ImageToGcode program and his help getting me up and running with the latest version. Also, I’ve also learned some pretty interesting stuff playing with Aaryn’s Laser Calibration Power vs Feedrate “thing” (https://www.thingiverse.com/thing:3349071). And I’ve meant, several times, to say thanks to Jamie for his Test Pattern Generator (https://vector76.github.io/gcode_tpgen/)… thanks, Jamie! I’ve been playing with all of these over the past few days and it’s been interesting. I’ve learned a lot… and, being an old man, I’m sure I’ll have opportunities to learn it all over again – several times – in my future adventures. :wink:

[attachment file=104799]

[attachment file=104800]

First, a confirmation… definitely run from SD card whenever possible. Sending the gcodes across USB will have undesired and discernable effect on the image being engraved. These photos show the same files being run twice – once from Octoprint/Pi over USB and the other using LCD/SD – and show dramatically different results…

our old “shades of gray”…

[attachment file=“104789”]

and Aaryn’s Laser Calibration Power vs Feedrate gcode (unaltered)…

[attachment file=“104790”]

[attachment file=“104791”]

Then, using info gleaned from Aaryn’s gcode, I was able to get reasonably good images using laser powers, ranging from full down to 1/6 (17%) , at various speeds and resolution with Victor’s ImageToGcode.

[attachment file=104796]

Finally, I decided to try my hand at editing gcode generated with Jamie Test Pattern Generator. Had to brush up on my regular expression “skills” but managed to get Jamie’s code running with laser… and used that to fine tune the steps/mm on my FoamRipper’s X and Y axes. [I think it would really be neat if your Test Pattern Generator could also handle laser gcodes as well, Jamie… hint, hint ;)]

[attachment file=104797]

A little parallax error from the thickness of the ruler and the position of the camera but it’s dead on now…

[attachment file=104798]

I’ll stop here… for fear of making a bigger mess of this post. But I wanted to get these posted before I forgot everything.

– David

 

 

 

 

1 Like

FWIW, you can enable sd card support in octoprint anf upload gcode to the sd card and run it from there. It wasn’t very fast last time I checked, but if you’re patient and lazy, it can save you some back and forth with the sd card, and some twiddling with the lcd.

1 Like

Thanks, Jeff. I did try that actually. It was so incredibly, painfully, slow that I aborted it midstream. For now, it’s not too big a deal… everything is in the same general area. I’ve got a small Chromebook set up on the end of the worksurface, displaying the Octoprint/Pi page, along with the Pi ZeroW with camera hooked through USB to the MKS Gen L V1.0 board. I use the Chromebook to write the gcode files (which I email to myself) to SD and use Octoprint to do all the jogging and positioning. Only as a last operation, then, I use the LCD to select the file and start the job… and I think the results are worth it :slight_smile:

[attachment file=104838]

– David

 

20190701_072809.jpg

I think I’m getting the hang of editing gcode files for laser. Here are a couple of prints from this morning… one is a Blackstripes crossed [lines] stylized picture of a cute, but mischievous, little girl and the other an ascii text file of our beloved Tux, run through Jamie’s Test Pattern Generator (Text option). Both were originally pen-plot gcode files, edited for laser.

[attachment file=104925]

I haven’t figured out how to do the shaped text – with custom text – yet, as Jamie originally showed in his “All work and no play…” thread (https://www.v1engineering.com/forum/topic/all-work-and-no-play/)… so, for now, I’ll just do the ascii art thing, and paste it into the Test Pattern Generator :wink:

– David

Those are cool, Tux looks like you did it with a blowtorch and typewriter!

1 Like

it looks really nice! Thank you David for sharing your adventures :slight_smile:

1 Like

Thanks, Jamie. I’ve learned my lesson… until tomorrow… by which time I will have forgotten and will need to relearn… ad infinitum… :wink:

[attachment file=105000]

– David

2 Likes

Rarely will you ever see a real “product” coming off my machines… I’m usually just fiddle-farting around, trying different stuff. But I decided to actually try doing something “useful”, a photo, using Victor’s ImageToGcode program and what I’ve learned while messing around with it over the past couple of days…

[attachment file=105440]

[attachment file=105444]

This was using 17% power from the 2.5 watt laser, feed rate of 10 mm/s, and resolution of 0.1 mm. Pretty slow feed and low power, for the cereal-box cardboard, it was a 4 hr, 45 min burn. I’m sure it could be done faster/better but, all in all, I’m happy with the result.

An aside: I’ve always been drawn to this photo (it might be a painting…) as this is the somewhat unique view I had during the launch of our KA/EKA-3 aircraft from the USS Coral Sea during the 1969-70 time frame. I was always in the port-side catwalk (quite a bit closer to the engine than where this photo was taken from) to handle any last moment radio/avionics issues. Once the pilot gave me the thumbs-up that all was okay and the last deck-handlers rapidly cleared out from under the aircraft, the pilot ran the engines up to full-scream and launch was only a few moments away. When the plane finally lurched forward and started moving down the deck, the outer wing passed right over my head, and the last thing I saw was the plane “flap its wings” – one time – as it went over the bow and they took the full weight of the 80,000+ pound aircraft. I don’t think I appreciated how exciting that moment always was, then… but I do now :wink:

– David

 

3 Likes

Thanks for sharing, David. That is a neat experience and a neat project.

I could not imagine being that close to a running engine!

Thanks, Jeff and Ryan. I appreciate you guys. As you can imagine, there was a lot of wind and sound on the flight deck… though the screaming engine I was only a few feet away from pretty much drowned out everything else. There was so much sound, and so close… that, even though I always had on ear protection, I lost a great deal of my hearing in those years, during and after the Navy, that I worked around jet aircraft. But I pity those poor guys that actually hooked planes up to the catapult – just like the ones in the picture – they were crawling around on their bellies and getting even closer than I was! It was truly a crazy, dangerous place… with planes moving and turning all over the flight deck, getting queued up to launch, you really had to have your head on a swivel.

It’s interesting now that as I look at the “original” of that picture again (I found it online years ago…), it looks as though it may be a painting rather than a photo… that looks as though that might be a signature in the lower-right corner.

[attachment file=105568]

Either way, it still “works” for me… capturing both the moment and the view :slight_smile:

– David

a3_on_cat.jpg