gotcha

Author Topic: how to warp image to fit onto label?  (Read 1674 times)

March 20, 2019, 08:44:35 AM
Read 1674 times

adpuf

  • Jr. Member

  • Offline
  • ***

  • 26
How do you warp an image to fit onto a label for a cup?

I have a pdf of the label template and I believe the image is png
  • .91
  • Windows 64 bit

March 20, 2019, 08:45:51 AM
Reply #1

adpuf

  • Jr. Member

  • Offline
  • ***

  • 26
here is the label
  • .91
  • Windows 64 bit

March 20, 2019, 08:47:01 AM
Reply #2

adpuf

  • Jr. Member

  • Offline
  • ***

  • 26
Here is the template
  • .91
  • Windows 64 bit

March 20, 2019, 02:51:39 PM
Reply #3

Lazur

  • IC Mentor

  • Offline
  • ******
  • Inkscape Filters Wizard

  • 1,154
  • Gender
    Male

    Male
Hi. If you want to achieve the result with inkscape you need to trace/draw the wd40 label as vectors, group it, then apply a bend path effect on the group and adjust the trajectory curve so the result match the cup template.

Other option is using a raster editor program like gimp. Or even better a 3D program like blender. Inkscape doesn't offer much raster image editing functions. Theoretically a displacement filter could be used with an image filter primitive as suggested by the manual but that's like climbing the K2.

March 21, 2019, 02:46:03 PM
Reply #4

adpuf

  • Jr. Member

  • Offline
  • ***

  • 26
Thank you so much for your response! Unfortunately this goes way past my skill level.


Anybody know how to do this?  Maybe someone can convert it for me and I can pay a few bucks?
  • .91
  • Windows 64 bit

March 21, 2019, 02:58:40 PM
Reply #5

Moini

  • IC Mentor

  • Offline
  • ******

  • 1,568
    • VektorRascheln
There's an extension for it for Inkscape, for raster data (not vector!) : https://gitlab.com/su-v/inx-modifyimage

March 21, 2019, 03:07:48 PM
Reply #6

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
Beginners instructions for installing an extension (such as Moini suggested) can be found on the Home tab, near the bottom.

I've never even heard of that extension, so I have no idea if a beginner can figure it out.  Knowing su-v, it might not be very obvious.  Hopefully Moini could break it down, if necessary?

Otherwise, I could tell how to do what Lazur suggested.  It's not hard at all.  It just might take some RAM.  I'd say you'd need at least 4 gb, but 8 would be better.  I could break it down into steps, if you like.
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

March 22, 2019, 04:37:28 AM
Reply #7

adpuf

  • Jr. Member

  • Offline
  • ***

  • 26
Oh wow!! Absolutely!!!  Thank you
  • .91
  • Windows 64 bit

March 23, 2019, 12:56:12 PM
Reply #8

flamingolady

  • IC Mentor

  • Offline
  • ******
  • Flamingo Lady

  • 154
  • Gender
    Female

    Female
Were you able to get what you need? 
I took the word 'warp' to mean a very slight bend in the top and bottom path.  Also to re-size to fit onto a label, which means to adjust the size.  so I'm not clear as to what you want, might be helpful to know if you are printing onto a specific label (size), and what outcome you want.  I took a look and some white space needs to be cut off all around it.  If I can help you, pls PM me as I don't get back here as often as I'd like these days.
ps I took a look at that extension, didn't make sense to me, had some sort of msg come up.

March 25, 2019, 04:45:47 AM
Reply #9

adpuf

  • Jr. Member

  • Offline
  • ***

  • 26
No, not yet. :(

I am not sure what to call it...

When you take a piece of paper with wording and then try to wrap it around a tapered object...the words then become curved.

I am trying to fit my image in the label so that when i wrap it, everything is straight on the cup (tapered object)
  • .91
  • Windows 64 bit

March 26, 2019, 12:24:05 PM
Reply #10

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
Oh gosh I'm sorry, somehow I missed your last message, or I would have written the instructions already.  But at least by now I've had a chance to review your project, and investigate (somewhat), the extension which Moini mentioned.

Yeah, I'm not installing that extension.  At least not right now. There are some extra things that have to be installed, and I'm just not up for that at the moment.

But for your project -- if the label itself is in a raster format (PNG, I think) it might be better to use a raster graphics program.  Does your printer require vector contents?  If not, then Inkscape might not be the best program.

Ok, find out what kind of file you need to send the printer.  If you need vector contents, I'll be glad to write you some instructions.  If not, I would suggest using GIMP (I don't know much about using gimp, but I'm pretty sure it has a tool or feature that will do this. I don't have a link, but I think there's at least one forum for gimp users.)
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

April 03, 2019, 01:39:05 PM
Reply #11

Cathy9887

  • Sr. Newbie

  • Offline
  • **

  • 3
Brynn -

This may warrant its own topic, so if so, I'm happy to start a new one... but since the basic desire is the same, I thought I'd start here.

I am also wanting to apply something (a template/stencil) to a tapered cup.. but for the life of me, I cannot seem to get the template created with clean lines.  So far, I've spent countless hours attempting to perfect the lines, but I'm not having very good luck.  What  I have right now is the outline of a tapered wrap template - essentially, a label of sorts.  I want to fill the label with a harlequin/rhomboid/diamond pattern.  I've got one created for a straight sided cup... but the tapered cup is quite literally killing me. 

Here's a link to a Dropbox folder where I have a file that includes the straight template.. the "in-progress" of what I've been creating manually, as well as a photo of a cup I did for a different size (and a different process.. a stencil is necessary for the one I'm doing this time). 

https://www.dropbox.com/sh/y8lm2jcucmb12qf/AAAFrbEHQBgaK1UdDxsDAlnSa?dl=0

I can't WAIT to hear your suggestions... as I only have a few handfuls of hair left.   :hh:

Thanks!! 

Cathy
  • 0.92.3
  • Windows 10 Home - 64 bit

April 04, 2019, 02:25:12 PM
Reply #12

Lazur

  • IC Mentor

  • Offline
  • ******
  • Inkscape Filters Wizard

  • 1,154
  • Gender
    Male

    Male
Hi.

Here goes nothing:


Quote (selected)
Creating a papercup distortion with inkscape.

Polar coordinates transformation achieved by using the bend live path effect.

Knowing the video is very sloppy, my brain'd sure use some of those all purpose liquids.

Here is what happened:
Due to the small screen area only the width spinbox appeared on the captured area.
Used the default template svg in inkscape 0.924, which has its display units in mm, while the measure path extensions previous setting was in px and in area mode to top that...
Another issue was the text bug where instead a reliable 120% line spacing of the size of the em square, 1000% percent is present no matter what.
Selecting the text to move it around took another few misclicking, due to another bug... once the text was groued, it can be dragged around easily.

Also no sound,

But if you cared to watch through this struggling mess the basic process is quite simple:
1. Measure the length of the "centerline" of the unwrapped cup template, from the visual edges -gluing part will be invisible, don't measure that.
2. Measure the "height" of the unwrapped template -in a direction perpendicular to the centerline.
3. Draw your image as 100% vectors -NO raster images, no pattern fills, no texts, no clipping, no masking, no gradients and no stroke widths. Plain and simple, just flat filled paths atop eachother, grouped together.
4. Adjust that group of path building up your image to fit the measured lengths with width and height
5. Select the "centerline" you measured before and copy it (Ctrl+C)
6. Add a bend path effect to the "image", group of paths and in the path effect settings set the trajectory path from the clipboard.
 

To perform the first step, you'll need to draw the centerline. In the video, used the interpolate path effect.
By duplicating the unwrapped template,
unconnecting the two straight segments,
reversing one of the now subpaths direction, and applying the interpolate path effect (memory leak captured? possible bug)
setting 3 steps from the default 5
converting object to path and deleting the unnecessary path segments.
Then, using the "glue area" edge's duplicate to cut the visible area's portion.


In step 3 I forgot to flatten the text to a path and even when was doing so, the remained grouped characters inherited some transformation that affected the outcome.


So once again, key steps
-draw core "centerline" path, to be used as a trajectory for the bend path effect
-preprocess your undistorted object to be 100% vectors, the right size, with no transformations and
-apply bend lpe on it.


Have fun and good luck!

April 04, 2019, 06:55:23 PM
Reply #13

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
This is one of those many cases where there is more than one way to do it, with Inkscape.  I was thinking about this with the first case presented here, but I wasn't sure if it would work, and I got distracted and never came back to the idea.  But this case is significantly different, in that the contents that are going to be wrapped around are MUCH simpler.  I thought getting all that tiny text to be readable after warping it would be a challenge.

Anyway, I wonder if the Bezier Envelope extension would work here?  I can't think of a reason why it wouldn't (although that doesn't mean there isn't a reason).  Here's a tutorial which also contains links to the needed extension.  http://cleversomeday.com/textwarpink/ 

The only difference between your project and what this extension was designed for (warping text) is that your paths won't be text, but something else.  But they're still just paths, and I think they should warp just the same.

Let us know how your project goes!
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann