Showing posts with label Tutorials. Show all posts
Showing posts with label Tutorials. Show all posts

Create an advanced Barcode

In the earlier tutorial, we learned to create a barcode which was simple. Here I will teach you how to design Barcodes which look more realistic. I asked you to save the .psd file on which you were working in the previous tutorial. If you didn't here's the psd file, download unzip it and open it in Photoshop. It looks like this:

Barcode Image

I'll write about making two types of Barcodes which are frequently seen in images. The first one is similar to the above graphic. The numbers are pushed up a bit between the bars. This is what you need to do:

Select the Type Tool (T) and click on the number and press Ctrl+A to select the numbers, now change the number to something like 9 251454151 655165188. Use three spaces in each gap. Now press the Move Tool (M). You'll get the following image:

Now select Type Tool (T) and click on the number, click Ctrl+A to select all the numbers and in the Text Options, select the text color to a Red (change it from black to red), I'll explain why we did this later. When done select the Move Tool and move the number towards the bars, see the image below:

Now zoom in (Ctrl+Space+Click) and drag a rectangular marquee from bottom right corner to up-left just above the number. See below

Now in the options box of Marquee Tool, select "Subtract from Selection" (can't find it? read > Marquee Tool). Alternatively you can press Alt key while you work. I assume that you've selecte "Subtract from Selection" from the Options Box. Now drag the selections to the gaps of the bar. You'll have to do this three times for three gaps present in the above image. See the image below:

Marquee - Subtract from Selection

If your selection exceeds the required area, press Ctrl+Z (or Ctrl+Alt+Z) After the selection is made, select the Barcode layer from the Layers window. If layers window is not shown, click on Window >> Layers. Clicking on the Barcode layer will select it.

Now press delete from your keyboard. (the logic is that the background layer of the Barcode Layer is white so if you delete anything from the Barcode layer, a white will appear. If you're feeling confused, you can read the Photoshop Layers tutorial to learn about it) I assume that you've got the following result:

Now press Ctrl+D to remove the marching ants around the selection. Zoom out to view the actual pixel of the Barcode. You can now change the font color to black. Red was used just to distinct the numbers from the bars while using Rectangular Marquee Tool but you can use red too, I think I've seen Barcodes with red numbers. Compare your final output with the one below

Final Barcode Image

Let's do another tweak to the above Barcode to change it's look.
Increase the Canvas width. Image >> Canvas Size (Alt+Ctrl+C) and make sure Relative is checked. Give Width = 1 inch. We don't need to increase the canvas height. Why? You'll know later. Press Ok.

Rectangular Marquee select an area in the Barcode as shown below:

Remember how we used Move Tool (M) to duplicate+move a surface? Make sure that the Barcode Layer is selected. With Alt key pressed, move the selection to right, a bit down and press Ctrl+D to complete the process. See below

Alt+Move Tool

Next, use the Type Tool (T) to drag a rectangle above the new bar and give a 3 or 4 digit number there. I gave 90200. Now Crop the area discarding the gap on the left so that the Barcode remains with equal spacing all around it. Discard a bit of the bottom section too since you moved the number upwards which creates a greater gap below the Barcode. The final Output is as follows, compare it.

Final Barcode Graphic

So... Happy Barcoding :D. Hope you enjoyed the tutorial. Here are some more Barcode graphics, try the one you like. There are fonts of the barcodes avilable too, click here Barcode Fonts to download one of them. You can use them to just type in and the output is automatically the barcode.

Different Barcodes Avilable

a lot of them isn't it?

Create a Barcode in Photoshop

A Barcode is a coding system on a surface which can be read by machine. Usually it is black parallel lines of different thickness in white surface. Adobe Photoshop is the best way to create a "fake" barcode. Here's a simple tutorial for designing Barcode in Photoshop:

Fire up Photoshop >> File >> New (Ctrl+N)
Give Width = 150, Height = 80 (pixels), Resolution = 72 pixels/inch
Color mode: RGB 8 bit, Background: White

Click on the "maximize" button in the middle of the three top right buttons. You can work with ease with a maximized window. Now as the first step, Create a duplicate layer (Layer >> Duplicate Layer. Name the new layer as Barcode.

Now go to Filter >> Noise >> Add Noise, with these settings:

Amount: 400 (full), Distribution: Gaussian, Monochromatic. The result should be like this:

Now go to Filter >> Blur >> Motion Blur, with 90 degree and Distance 999 pixel (full)

You can already see the Barcode we need. Now we need to adjust the brightness/contrast of the above generated barcode. Go to Image >> Adjustments >> Curves (Ctrl+M) and give the adjustment values as Input: 140 & Output: 110. To do this, click on a point on the curve and when the Input/Output text box is active, you can give the respective values. The result is a darker image of the Barcode.

Now let's give a white border to the Barcode image. It can be done in several ways one of which is resizing the canvas. Go to Image >> Canvas Size (Alt+Ctrl+C) and with the "Relative" checkbox turned on, give 0.5 inches to both width and height and press Ok. Save the result, File >> Save As >> filename.psd (save this in .psd format), it'll be in use later in the Advanced Barcode Tutorial.

It should look like above. Now let's add some text on this thing. It can be a number or text. Select Type Tool (T) and select the font > Arial. Regular. Size = 12. Strong. Color: Black. and drag an area wherever in the image and type in something like this number

"0 2514569841516551151651" note the space after the first 0. You can view Barcodes samples around the internet to make the one you like the most. When you're done typing the number, select the Move Tool (M) and move the number to your desired are (use arrow keys to move, it'll be precise). Make your output look like the one below:

You can resize the result to a smaller size to use for your own image. Go to Image >> Image Size (Alt+Ctrl+I) Scale Styles Checked, Constrain Proportions Checked, Resample Image: Bicubic. Give the new width and height value as Width = 50, the value of height itself changes since Constrain Proportions is turned ON. It'll be very small with this size. To save this as a jpeg image, merge all the layers, do Layers >> Merge Down, twice and you'll have a single layer remaining and then File >> Save As >> filename.jpg. Here's how you can use this Barcode in an image. Save the pic below and open it in photoshop, remember this pic we used in Crop Tool?

If the image is in maximized mode, click the Restore Down button at the top right of the photoshop window. Not the one of Adobe Photoshop but of the image.

Now I assume two images are open in your Photoshop window, one the Barcode we created and other the image of the man and the baby. Select the Move Tool and use it to drag the Barcode from it's window to the image above. See below:

After you Move (drag) the Barcode to the image on the right, release the mouse and then again move the Barcode to the desired place, somewhat like on the image below

Looks professional isn't it? You can use Barcode in various styles. There are several other looks of Barcodes. This is the basic tutorial to create it. Click on the tutorial below to learn more specific versions of Barcode.

Create a Barcode in Photoshop II