Is there a proper procedure to have embedded images in your .svg files?

Is there a proper procedure to have embedded images in your .svg files? I have been running into the problem in the latest release of Laserweb4 (4.0.48 for win64) in which the embedded image is at the wrong location and is also the wrong size from where I have it in the Inkscape svg file. I think it worked fine with an older version of Laserweb4 from a couple months ago, but I can’t be sure.

The way I created the file in Inkscape was by importing the .png file (embedded), scaled it, and then positioned it in relation to the other “paths”. When I do it this way however, the image shows up in the wrong location and the wrong size in Laserweb4

I also created a version where I turned that image into a bitmap. I believe this is how I used to do it. It loaded fine into Laserweb4 with the correct size and placement, but Laserweb4 wouldn’t allow me to create a “Raster” toolpath with that embedded image. That option was greyed out and I couldn’t select it. (see images below).

I am assuming that it’s user error on my part, so I was wondering if anyone knew the proper workflow to embed images into svg files for Laserweb4.

In case it is an error, or you want to troubleshoot, I have uploaded the files and the Laserweb4 workspace for both the Bitmap and non Bitmap version here. https://drive.google.com/open?id=0B8ZXvH-aGzn9SEk0SlZ5WEF3M3M

Thanks

I also seem to have better results with .png files over bitmaps. I also size them together then save the png separate now that Laserweb4 has such a great CAD interface. Easy to position and resize as needed. I also made a .svg with a square and circle for quick cutout jigs(resize around any pattern).

+Peter van der Walt Yeah, for this file the Laser Fill option would work, but that still wouldn’t solve the problem if I were to use a photograph or portrait in place of that logo instead. I use images embeded in svg’s alot so knowing how to properly do it will help in the future as well.

@Domm434 The problem with Re-sizing it and moving it into position is that you have to eyeball it, or remember the exact coordinates. This works when you don’t need accurate positioning, but for other designs where I would need sub mm accuracy for the images position, it makes it alot harder to deal with.

I think I remember that Laserweb 4 used to be able to raster bitmaps in svg files. Has that changed? Although having the ability to have a normal .jpeg or .png would be just as usefull.

what dpi do you have set in inkscape and lw4?

Could be related to this https://github.com/LaserWeb/LaserWeb4/issues/211.

@Domm434 ​​ Laserweb 4 is 96 for svg and 300 for bitmap. Inkscape exports the svg at 96dpi. Oh, I should have also mentioned, I have the document set up in mm as well in Inkscape, so that shouldn’t be a problem.

@Ryan_Branch inkscape svg dpi depend on the version v.91 is 90 and v.92 is 96

Yeah, I’m using v.92. I double checked that before I posted.

@Ryan_Branch ​ im unable to replicate, I’m using .91 and I’m getting perfect scale on Inkscape and illustrator . The only bug i get I’d rotation.

I haven’t looked closely at the SVG parser’s code yet (time issue), but I’m starting to think there’s a hard coded 90 or 96 deep within it that’s throwing off a lot of things (e.g. Corel files).

@Todd_Fleming ​ I’m not getting any issues on scaling at all , I must say I haven’t dealt with Corel svg

@Ariel_Yahni_UniKpty you’re one the Inkscape version that we tested with.

@Ariel_Yahni_UniKpty ​ Thanks for trying. I might need to test a different version of inkscape. I definitely don’t get any rotation though.

I am having this same issue. I am running Inkscape .92 and have to have LW settings at about 90 px per inch vector for the vector to come out close to the right size, but still imports slightly off size.

Wow, so it’s been a while since I have actually used our laser, but after attempting to use Inkscape .92 I found that the file is scaled way down in Laserweb. I then uninstalled 0.92 and installed 0.91. Then I created a new design from scratch, and it imported perfectly!

One key thing is that you have to “design” it in 0.91. If you try and import the file from 0.92 into 0.91 and save it, it will still not import properly in Laserweb. Going to stick with 0.91 from now on. Maybe it would be worth recommending 0.91 in the “working with svg’s” part of the wiki?