Existing SVG file as a background

Yes. That’s why I suggested a few posts back using a reference square to scale to. Actually working out how to grab the selection points of the background image plus the draft block, and performing the transform on the image to match the draft block & scene coordinates is quite another.

That being said… since the idea of a background image is to trace over… there’s no need to have an existing draft block to anchor to. Assuming the image has a predetermined sized square in it, just need to select 2 (opposite corner) points of the square and scale it to the predetermined size. Like maybe you select the 2 points, a dialog pops up and asks for the size of the square… and maybe if you want to rotate to align to the horizontal & vertical. Voila. From there the idea would then be to select a point on the image and have it move to the draft block basepoint. Now you can start drafting a block over the image.

Although the topic title is SVG file… my feature allows the use of most common formats… .bmp, gif, jpg, jpeg, svg, tif, png, pgm, ppm, and a few others. What ever behavior the feature exhibits, it has to apply to any of the QPixmap image formats.

2 Likes

Just a follow up… I would expect the most common use of using a background image would be taking a jpg picture of a pattern, and tracing it. The easiest thing to do is place a precut square of a given size on the pattern, then snap a photo. Such as what I did here with a pattern piece from the jackets we recently worked on for the movie here. The square is 3in x 3in. I didn’t do it here, but I would use a photo editor to true up the image to correct any distortions in “squareness”.

3 Likes

I like the idea of having the test square to scale the image and rotate it. Brilliant idea :slight_smile:

The concept is easy… but like I implied to Keith, implementing it is going to take some work. It’s why I needed to go further than just adding a pixmap graphics item to the scene… it needs to a subclassed graphics item so it can contain the custom code to receive and act on mouse events.

That being said. I think there’s going to have to be a couple tools required to scale / rotate and set the basepoint interactively. For example you would import an image, then select the “scale” tool… a tooltip will say “select top left point”, then “select bottom right point”… dialog pops up asking size of square. Based on that the app can calculate the scale the image needs to be, and what degree to rotate if you want it to square up to the work space. The other tool would be locate basepoint… tooltip - “select basepoint”… locates that point to the current draft block basepoint.

2 Likes

Yes, I’m thinking that one should really keep it simple (KISS), I don’t know how a pattern designed this way would resize once a person adds measurements to the design, since you’re not starting with a basic pattern. So I’ve been looking at this concept as a background image that one can refer to while designing to keep me on track rather than something that needs to copied - like your image with the square which is just one panel for one size.

But I leave it in your very capable hands :slight_smile:

3 Likes

While contemplating a way to actually trace a background, and be able to use formulas in the measurements I figured I read back through some of the old Valentina discussion on the issue. Susan had proposed this idea, based on using a radial method of scaling:

AND/OR …

We may come up with something entirely new. After importing the bitmap and the user starts defining a new pattern on top of it, and the initial point is created, the next point is created using a ‘Reverse Engineer Point’ tool which calculates the distance and angle from the initial point to the new point and autofills in the formula. All points of the pattern are created with the ‘Reverse Engineer Point’ tool, so they all ‘radiate’ out from the initial point. This pattern would be an exact vector copy of the bitmap image and would not require a measurement file.

Problem is there is no way to “grade” it based on measurements without getting into messy trigonometry using the length and angle of the radials. Skip to today - we already have a tool that uses length and angle. Which you could use to scale it, but that’s not grading. So my solution to solve this is to create a new “rectangle” tool, that would be based on width & height formulas from a starting point. The tool would snap the starting point to the basepoint, and then you rubberband to the second point. The tool would then set the width and height formulas in the tool dialog. In other words, it’s a tool to create a point XY from a given point. Based on a method of grading I’ve described elsewhere, you could then create and grade pattern pieces based on a measurement file. Besides… if you can’t use a measurement file then why use Seamly2D? You can trace a bitmap in any number of applications to an SVG.

background

A rectangle tool on it’s own would prove to be useful.

3 Likes

One concern is if the pattern doesn’t include a square. Being able to anchor to two arbitrary points and then enter the distance between them would be the next best thing. (…with the option to rotate the background image to match a declared angle for the line.)

Sorry if I’m reinventing the wheel, here. My brain isn’t processing well lately. Major depression is a b***h.

1 Like

Got that part covered so far. Working on subclassing the qgraphicspixmapitem class to allow for directly interacting with an image - which BTW can be used later to have an image tool to add images to pattern pieces. Part of the interaction with a graphic item is to be able to detect and act on mouse events within / on the item. So until I get that squared away, can’t do anything with an image like scaling to some reference.

2 Likes

Verstehe ich das richtig? Mit dieser Methode kann ich dann Grundmuster, wie z.B. Kaputze, Kragen, Saum uns Ärmelabschlüsse in einer Datei konstruieren und später in meiner Musterdatei an zwei oder drei ausgewählten Punkten andocken? Wenn es dass ist, wäre es eine Revolution:) Ich habe mir angewöhnt Grundmuster wir besagte Kaputze, Kragen, Ärmel usw. Punkt für Punkt der Konstruktion aufzuschreiben, damit ich nicht immer wieder von neuem das Muster durchüberlegen muss…

1 Like

I wish this was something a feature could do. The objective of this feature is to be able to load an SVG image (or other types like png, jpg, bmp, gif, tif) as a background… and then after getting it scaled / rotated properly to be able to trace over it to produce a Seamly pattern. The image would for example be an existing pattern piece.

So far I have it where you can load an image per draft block… some of the discussion has revolved around how to automate the process of scaling the image to proper real world size in the draft workspace. Right now you would have to scale the image manually by including a line (or square) of a known size, then by trial and error tweak the size so the image on screen is the real size.

2 Likes

This sounds fantastic! I think it is along the lines of the program Fittingly Sew 2, where you can import an image and build your pattern on top of it. Is there a build available with it yet, please?

2 Likes

Exactly. Actually the way I set it up is each draft block can have it’s own background image.

Officially, no… there were a few items I wanted to resolve, but I may push what I have so far to my fork as a test build. You could then check that out… maybe provide some feedback before I push this feature to the main. If you followed along the thread here, one of the things I’m trying to resolve is making the background interactive - like the labels - that and some easy method of setting the proper scale of the image.

3 Likes

I am willing (anxious) to test whatever you have. I am willing to provide feedback. Also, I am happy to navigate the technical part of downloading from your personal fork. Thank you for the opportunity.

2 Likes

That’s great! I would love to give it a try. With regard to scaling, I agree that including a square of known size in the image would be a pretty reasonable requirement. Thank you for your great work!

1 Like

Yeah… even when I figure out a way to interactively scale an imported image, you still need something in the image to reference the scale. Easiest thing I found is to just cut out a 3x3 or 4x4 cardboard or paper square you can just place in whatever you’re taking picture of.

3 Likes

FWIW, here are some tracing features that would be handy to have.

1 Like

Not sure how these are tracing features applicable to a background image in the context of this issue… image features yes, but not tracing.

  • Use scans or photos of fabrics to display fabric colour patterns on your pattern pieces.

While easy to implement- just apply a pixmap (image) to the brush of the pattern piece… but not in the scope of this issue.

  • Pattern pieces are now colour coded according to how they were made

This is in the works… more specifically color coded to material type. Again not in the scope of this issue.

  • New grid & zoom options

A grid could be useful… already looked into code for this… which kinda goes along with ruler displays. Might be applicable to this issue?

  • Fade or tint the background image in order to make the shape outline and points more clearly visible.

Already incorporated into this issue. There is an opacity setting for a background image.

  • Finally use the new Rescale Piece option to obtain the exact overall size.

I think for our use this is backwords… IMO we need to scale the image to real size first, then trace. More importantly we need to be able anchor the image to a basepoint - as that is the starting point of any draft block.

  • Printing

Out of scope.

  • Scan or photograph your fabric for a precise fabric layplan

Again - out of scope - has to do with for ex: matching & laying out plaids.

  • Join the digital fabric printing revolution! Design totally original fabric colour patterns starting from any graphic image using spatial distortions, geometric reflections and colour effects.

Totally out of scope. This is better suited to a paint / vector application.

2 Likes

Hi Douglas and everyone,

I signed up 2018 but quite soon I stopped using this otherwise very nice software, precisely because it was not foreseen to import an image as background. I really missed this possibility, because my aim mainly was – and still is – to get a precise digital copy of a pattern first drawn on paper (until I am good enough to draw them directly in the software, but this might last a bit…)

I hope to understand well (English ist not my mother tongue…) that this feature is very close to be implemented, and that is what made me come back :slight_smile: Thank you so much for working on this developpment!!

Please keep us informed as soon as it is possible to use it. I am very, very, very much looking forward for this news function (and I guess I am not alone!) and I can’t wait to have my first tries with it.

Thank you again, best regards, Noukita

3 Likes

@KeithFromCanada Please add these “out of scope” items as feature requests on GitHub, plz!!! Thanks, it’s good to hear from you!

1 Like

Meanwhile, to see transparent overlay windows (OSX / Windows) : Overlay 2.1 software, created by Colin Thomas.

The trial version is not too disturbing.

Best regards from Paris !

Nicolas

2 Likes