0

I would like to take a picture and mold it in the shape of a 2D heart.

Here is an example picture:

http://i.minus.com/ibgfLNPvp6jCLt.png

I hope to accomplish a heart shape using this picture and have the blues ends meet at the bottom tip of the heart.


Edit:

Because everyone seems to be so stuck on my idea behind what I am doing with barcodes and not focusing on the question at hand, I decided to remove everything related to barcodes from the question and instead just used a stock picture that I would like to stretch across a path.

8
  • 1
    I don't see how you'd be able to read barcode that is in the shape of a heart. Unless the barcode is just a filling inside a heart shape. ...Or am I missing something here?
    – Joonas
    Commented Aug 12, 2012 at 21:36
  • Also, why would anyone design a barcode font that isn't actually readable by a barcode scanner? Anyway, you can find plenty of functional bar code fonts if you just Google for them, e.g. here. Commented Aug 12, 2012 at 22:00
  • The barcode is just to symbolize something, the person would have to straight it out to be read. Barcode fonts only give you the representation of each chracter, they do not contain the start/end character or anything else that make a barcode scanner be able to detect, in most cases.
    – ParoX
    Commented Aug 12, 2012 at 22:22
  • 1
    So, it's the thought that counts. It's not meant to be read, but it is supposed to hold a specific content? At least I can't imagine anyone starting to straighten it out with photoshop just to read it. I'm just wondering for the sake of wondering, and cause it would be easier to do this with a fake barcode.
    – Joonas
    Commented Aug 12, 2012 at 23:16
  • 1
    I'm not certain you can do it in Photoshop easily.. it's a snap in Adobe Illustrator.
    – Scott
    Commented Aug 12, 2012 at 23:17

3 Answers 3

2

The question originally requested a way to distort a picture of a barcode along a path. This answer was an answer to that question - but may not be as applicable since the question has changed.


I recommend doing more research into how barcodes work before you attempt to incorporate them in a design1. There are over 40 bar code systems in active use. Each has its own "start and stop" requirements. Not all have terminal characters, some have other encodings and checkdigits. If you understand the system you are working with, and it is compatible with the font you select, there is nothing wrong with using fonts you find online.

One such system that works fine with fonts is a variable-length system called "Code 3 of 9" (or "Code 39"). The following image was generated with Code 39 from DaFont, and it happily decodes with the link you provided:

example

All that aside, I can tell you that what you are trying to do simply will not work. Once you plot your barcode along a path, it will become distorted. To "straighten out the path" and get a readable code, you'd have a complicated process requiring you to determine a centerline, plot the widths at the centerline, and reconstruct lines based on those widths. While that sounds theoretically possible, what are the odds someone will actually do that - and do it precisely enough that they can read your code?

1 - From a purely aesthetic viewpoint, fake barcodes can be just as stylish as real barcodes. The difficulty is incorporating usable barcodes.

7
  • Yes, I have done research on barcodes and I am aware that each one is different. I specifically want code 128 which does indeed have a start and stop character as well as encoding, check character and quiet zones. This is why the fonts do not work. In your example, that specific picture works, probably as it was generated as a demo. However using the fonts itself yields nothing readable: i.minus.com/jbCdLCaouBrAX.png (made with code 39 from DaFont). Furthermore, the software you linked is a barcode generator software and does not allow anything in photoshop at all. (It is not a font)
    – ParoX
    Commented Aug 13, 2012 at 21:39
  • Also I want to comment that it's suppose to very cryptic but not super impossible to detect, given the path is based on parametric plot (16 sin^3 t, 13 cos t - 5 cos 2t - 2 cos 3t - cos 4t) for the heart shape, it would be mathematically possible to convert it back to a readable barcode.
    – ParoX
    Commented Aug 13, 2012 at 21:51
  • @BHare (1) Your question makes no mention of Code 128. (2) DaFont generated the image using the font listed and the text I provided. Another example with Code 39 from DaFont.. (3) The links were not intended to promote any software, the information they have listed on the page is good information. Links have been changed to Wikipedia to avoid confusion.
    – Farray
    Commented Aug 13, 2012 at 22:13
  • @BHare Just noticed the question revision -- I don't know of a way to do what you're trying to do. The closest I can think of would be to do many small transforms using Envelope Distort (Illustrator) or Shear (Photoshop) - but neither of these will render particularly good results and, if you're still thinking about doing a puzzle out of a barcode, will certainly not be decipherable.
    – Farray
    Commented Aug 13, 2012 at 22:24
  • (1) The question deals with putting an image on the path, not barcodes. (2) I made this assumption because it doens't work for me at all: youtube.com/watch?v=isQLxsD6ENw (3) I realize that now.
    – ParoX
    Commented Aug 13, 2012 at 22:34
1

Download one of the free barcode fonts from dafont.com. Once you have the font in your system, open Photoshop and make a new Document. Next, select the Custom Shape Tool and pick the Heart shape and make a heart.

Next select Text Tool (Text on Path) and move over the heart shape you made. You'll notice that the cursor changes to three states based upon where you are in the document, outside the heart shape and it's a square marquee around the T, this means it's click for a text line, or click and drag for a text area; over the path it's a path and T, which is Text on Path and what we'll use; inside the heart shape and it becomes a circular marquee around the T meaning Text in Area. Click on the heart path when it is Text on Path and then start typing.

You'll get something like this: Example of BarCode text on path

You'll need to play with the path and font settings to get exactly what you'll want, but I hope this helps you. Cheers and good luck!

3
  • As explained in question, these fonts from DaFont are not actual readable barcodes, they do not have the required start and stop lines as well as other tidbit. Use this online barcode reader: zxing.org/w/decode.jspx on their demo pictures, such as dafont.com/img/preview/c/o/code_1280.png
    – ParoX
    Commented Aug 13, 2012 at 3:23
  • This actually is a readable barcode believe it or not, but only in some areas with proper width aligned information; I just made the lines shorter, which is allowable, as creating and managing a MIS was my job at one time, and a barcode was my fist companies logo. You seam to be laboring under the false idea that I used a font from dafont.com—I just suggested that's where he may find one as some fixed width barcode fonts can be pricy... And you still have to encode the data. Commented Aug 14, 2012 at 1:19
  • @BHare: The only way you can "easily" wrap an image to a path would be to use the Warp Mesh Transform Tool—enter the Transform Selection mode (Command+T on Mac), then in the Option Tool Bar click on the Warp Mesh icon. You'll probably want to start with an image that has plenty of resolution and then after you complete your shaping, copy and paste it into your working document. In addition, you may have to apply the warp mesh twice in order to keep control of the shape. Using the Warm Transform will provide you with much more control than using Liquify. Cheers! Commented Aug 14, 2012 at 1:24
1

If you wish to use Photoshop, then you'll have to familiarize yourself heavily with the Liquify filter. Create a shape on a layer to use as a guide, then the image you wish to distort on another layer and use Filter > Liquify and the tools within that filter to move and distort the image to match the template layer. It'll take a great deal of effort.

You could use Adobe Illustrator envelope distorting to alter the image, but that again will take quite a bit of care to get correct. The image below was done very quickly in Adobe Illustrator using your posted png.

image

Regarding bar codes.....

Even if you could get the image to conform to a path.... It will NEVER be a readable bar code again.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.