Design Coffee Cup Cream Using Photoshop

Here Is the Final Image which is we are going to Design.

coffee cream 17 Design Coffee Cup Cream Using Photoshop

Here is new one tutorial how to create coffee cup cream using just a few Photoshop filters.In the beginning of tutorial we should find some appropriate picture with cup of coffee. You can find it on the Google Images of feel free to use mine picture. Open up the picture and start our tutorial. I would like to add some gradient to our dark liquid surface. Use the Elliptical Marquee Tool to create selection as shown on the picture below.


coffee cream 01 Design Coffee Cup Cream Using Photoshop

After that use Select > Modify > Feather to feather selection borders about 3 pixels to bring our future gradient more realistic view. Ok, now select some appropriate colors, for example colors of #000000, #573700 and drag a linear gradient.


coffee cream 02 Design Coffee Cup Cream Using Photoshop

Remove selection with Ctrl+D and change layer mode to Screen for this layer.


coffee cream 03 Design Coffee Cup Cream Using Photoshop

Ok, time to create coffee cream. Create new layer and add a few white spots with Brush Tool and a soft round brush.


coffee cream 04 Design Coffee Cup Cream Using Photoshop

After that apply Filter > Distort > Twirl with similar settings to these:


coffee cream 05 Design Coffee Cup Cream Using Photoshop

The result should be next:


coffee cream 06 Design Coffee Cup Cream Using Photoshop

Looks not bad for now, isn’t it? Ok, goon on. After that apply another one Filter > Distort > ZigZag and set up next parameters for it:


coffee cream 07 Design Coffee Cup Cream Using Photoshop

Your picture should look as mine:


coffee cream 08 Design Coffee Cup Cream Using Photoshop

–~~~~~~~~~~~~–

Ok, move to the next step. Now apply Filter > Distort > Wave with next settings:
coffee cream 09 Design Coffee Cup Cream Using Photoshop

Result:

coffee cream 10 Design Coffee Cup Cream Using Photoshop

Don’t be afraid that cream goes out of cup borders. We will correct it later. Now apply Filter > Distort > Wave one more time, but don’t forget to change settings as shown on my picture below.

coffee cream 11 Design Coffee Cup Cream Using Photoshop

The result should be next:


coffee cream 12 Design Coffee Cup Cream Using Photoshop

Ok, time to correct cream out of cup borders. Use Ctrl+T to reduce coffee cream size a little bit.


coffee cream 13 Design Coffee Cup Cream Using Photoshop

Then select the Eraser Tool and a soft round brush about 30 pixels and clear all the strokes out of liquid area.


coffee cream 14 Design Coffee Cup Cream Using Photoshop

And the last one thing that we have to do is to change a little bit cream color. Change layer mode to Overlay for current layer.


coffee cream 15 Design Coffee Cup Cream Using Photoshop

Now it looks not so bright isn’t it? Ok in this way duplicate current layer and set opacity up to 50% for new layer.

coffee cream 16 Design Coffee Cup Cream Using Photoshop

–~~~~~~~~~~~~–

Ok, we are done for this tutorial. We got very nice realistic view coffee cream. Hope, u have the

same good result!

coffee cream 17 Design Coffee Cup Cream Using Photoshop



Create a Calendar Using Scripting in Photoshop

Final Product What You'll Be Creating

Creating a graphic calendar by hand is not an easy task. That is why it is best if you can find some way of automating the process. In today’s tutorial we will show you how to generate a full year, custom background calendar using JavaScript. If you’re a bit of a computer programmer, that is great, if not, don’t worry this will be pretty straightforward.


Step 1

According to Adobe, a script is a series of commands that tells Photoshop to perform one or more tasks. The first thing you need to do is take a look at Adobe’s JavaScript Reference. You can find it here. This contains all the object properties and methods Photoshop CS4 supports, with examples, and it will give you an idea on what kind of things you can do with scripting in Photoshop. If you are using an older version you can find references here.


Step 2

So let’s get started. The main idea for the project is to create text layers for each month containing the dates, so we will be working mainly with text manipulation. Open ExtendScript Toolkit and create a new JavaScript file (Command+N). This will contain all the commands we are going to give Photoshop. If you don’t want to use ExtendScript Toolkit, you can use any simple text editor.


Step 3

First we have to define some variables for the document attributes and the calendar color scheme. I made my document 1280×800 at 72 pixels/inch resolution, named it "PhotoshopScriptCalendar" and chose 2010 as the year of the calendar we will create.

This is the basic color scheme we are going to use. "NormalColor" is for weekdays and month names. For Sundays I used a different color in order to make them stand out, this is "highlightColor", and we’ll be using "backColor" as the default calendar background color if we do not select a custom image for that.


Step 4

As I said before, we are mainly going to work with text manipulation, so we must define some variables for the indentation and text that we are going to use repeatedly, like the month headers.

In order to set a different color to the Sundays column, we have to make it a different text layer from the other days. This is why we have two headers: "monthHeader" – Monday to Saturday, and "sundayHeader". Each of these two variables end with two "\r". These stand for new line characters, the same as pressing the Return key on your keyboard. Next we define the indentation variable. Notice that the first of January is a Friday, so for each day before that we must put an indent instead of numbers. The number of whitespaces of these variables depend on the font you use and the size of it, so it will need a little bit of trail and error before you get it right. Finally, make a list of all the month names.


Step 5

Now that we have every thing we need, we can start creating the .psd document.

As you can see, the code is fairly readable. To our Photoshop application, we add a new document with the specified width, height, resolution, and name we defined earlier, a color mode, and retain its reference in a new variable "doc". By default all new documents are in RGB, so we could have omitted that parameter, but if you want CMYK for example, you could use "NewDocumentMode.CMYK". The same with LAB, GRAYSCALE and BITMAP. You can find all of these in the references linked above.

Next we make a new selection and select the entire document, fill it with our background color, and eventually deselect it.


Step 6

Next we need to add a custom background from an existing image. The gradient background from the final result posted above is actually a separate image.

For this we are going to use the openDialog() function. This opens the dialog from "File > Open" and puts in the array "file" the list of selected images. We are going to use only the first selected image which is in the "file" array at position 0. So, first we need to check if any image was selected.

Next, we are going to load the selected image in our application and get a reference to it by calling "app.activeDocument" which returns the currently active document in Photoshop.

Resize the image to our preferred width and height. Again, we make a new selection of the whole document, copy this selection and close the document with the option of not saving the changes.

Finally, in our calendar document, paste the selection. This puts the image as the first layer above the Background layer. Then name it something like "BackgroundImage".

Notice that if no image was selected from the dialog, none of these commands would have been done.


Step 7

OK. Now comes the actual generation of the calendar. This could be a little more difficult, but we’ll take it step by step and hopefully it won’t be that hard to understand.

We need to do a set of actions for each month of the year. For this we use a "for" loop. Basically, this takes the variable "curr", which we use to denote the current month we are working with, sets its initial value to 0, then does the set of actions repeatedly, incrementing the value of "curr" each time, until this becomes 12. Thus going through all twelve months.

First we must define two variables we are going to use to position our months in the document as a grid. These represent the X and Y offsets of each month. We are going to put 4 months on a single row, so for the X offset we are going to use the "%" operation. This returns the remainder of the division of "curr" to 4. This offset is going to be the same for January, May, September, for February, June, October, and so on, for every month in the same column. For the Y offset we use the "Math.floor()" javascript function that returns the largest value, smaller than the division result of "curr" to 4. Thus for the months from the same row, the Y offset is the same.

In the end we want to have the layers for each month in a separate group. So we are going to start off by creating a layer group and giving it the name of the current month. We use here the list of months we defined earlier.


Step 8

Next we create a new text layer inside our group and set its name to the current month. This is going to be our month name layer.

Now we have to set the text attributes such as text color, font size, and justification. We are going to set the type of our text to "PARAGRAPHTEXT" and give our layer the preferred dimensions. The "contents" attribute of the "monthName" variable stands for the actual text that will be visible inside the layer, so we want this to be the name of the current month.

Finally we are going to rotate the layer 90° counter-clockwise and position our layer. Here we are going to use our offset variables "x" and "y".

Please keep in mind that the positioning is done relative to the layers’ top left corner, but since we’ve rotated the it 90° CCW it now has become bottom left corner. If your document has different dimensions from mine, you may need to change the constants I used for positioning. The values I used are listed below.


Step 9

Next we are going to make the text layer that will contain all the dates in the current month, except the Sundays. We are going to add it to the group we created earlier and set its name, justification, font color and size, and position it. We are going to add the content of this a little bit later, I’ll explain why, when we get to that point.

Same thing for the Sundays layer, but this time we are going to set the color to "highlightColor".


Step 10

Now, we need to create two variables that will hold our text as we generate it, "text" will contain the weekdays and "textSun" the Sundays. We start of by adding the headers and putting the indent for the first of the month. We create a new date with the javascript "Date()" function from the year of our calendar, the current month and the first of that month, and get its position in the week. Remember, the numbering always starts from 0, so for example if the first of the month is a Monday, "n" will be 0, if it is a Tuesday, "n" will be 1 and so on. Then we need to add the indent we defined at the beginning to our "text" variable as many times as needed. If the first of the month is a Wednesday for example, we’ll add the indent two times.


Step 11

OK. It’s time to generate all the numbers for the month. For this we need to know how many days there are in our current month and we need the numbers in "leading zeros" format, so we must go back and define two custom functions: "daysInMonth" and "makeDay". So please scroll up to the top of your code and add these functions. As I said the "daysInMonth" function returns the number of days in the month we give it, and "makeDay" returns the number we give it in a specific format and adds some whitespace, necessary for spacing the days of the month. So, for example if we call the "daysInMonth" function with the year = 2010 and the month = 0 (January) it will return the number 31. If we call the "makeDay" function with d = 3 for example, it will return the text "03 ", but if d = 13 it will return "13 ". Notice that if "d" is less than 10 it will add a zero before it.

We are going to start from d = 1 and increment it until it reaches the number of days in the month. Now, if "i" has the value "6" it means that it is a Sunday, so we have to add it to the Sunday layer. Remember to put an "\r" here for new line. Otherwise, we add it to the weekdays. Here we add a new line only if the current day is "Saturday" ("i" is "5"). At the end, we have to increment both "i" and "d", and if the value of "i" reaches "7", that is if the last day added was a Sunday, we have to make it "0" again.

Finally, we have all the dates in our text variables and we can add them to our layers. The reason we have delayed this step is that it takes some time for Photoshop to add text to a layer, so it’s better to add it all at once, rather than add each day separately.


Step 12

So, all the month layers are now generated, and all we need to do is to make the year layer, and that little line at the bottom. For the year layer it’s the same procedure we used before, create a new layer, give it a name, text size and color, and position it where we want.

For the bottom line it is a bit different. First we must define a region with X and Y coordinates for all four corners, then make a selection out of that region, fill it with our color on a new layer and finally deselect it.


Step 13

All our code is done! The only thing to do now is to run it. If you are using ExtendScript Toolkit, from the drop down menu select "Adobe Photoshop", if you do not have Photoshop opened, click on the little icon on the left "Connect to target application", and then press the play icon. If you’ve used a different text editor, save the file with the ".js" or ".jsx" extensions, and run it from Photoshop: File > Scripts > Browse and then select your file.


Conclusion

We are finished! Hope you’ve enjoyed working on this little project. Scripts in Photoshop are very useful when having to do repetitive actions and can make your job a whole lot easier once you get the hang of them. Please do not hesitate to send any suggestions you may have, they are always welcomed!


Databinding Using the FormView Control in ASP.NET

In this tutorial we will be learning how to create a FormView control and binding it to a pre-existing database table.

The FormView control lets us work with and manipulate data from the SQL database by using and configuring a simple control. In order to follow this tutorial you must have an SQL database installed in visual studio in order to bind the control to it. You can download and use the sample database tutorial in order to follow along as well.


The Concept…

Open the provided project in Visual Studio and right click on the name of the website in the solution explorer. Select Add New Item.

When the Installed Templates list opens, select a Web Form then name it and click Add. If you are planning on using this control in an existing project you can skip the previous steps.

Switch to Design View. In the Toolbox under the data menu, click and drag a FormView Control onto the page.

In the FormView Tasks menu, select the data source you want to bind to from the drop down menu (If you are using the sample database provided, the data source will be the default “SqlDataSource1”). See the image below.

Need help with cloud hosting? Try Server Intellect. We used them for our cloud hosting services and we are very happy with the results!


When the Data Connection Wizard opens,
Select ConnectionString from the dropdown menu and then click Next.


When the next window opens (Configure the Select Statement), make sure the Asterisk on the top of the checklist box menu is selected (this selects all items in the list). The columns list lets you select which items from the database table you want to incorporate into the control.

In the same window click the Advanced Button on the right side of the menu. The Generation Options menu lets you create statements within your control that allows the user insert, edit and delete content inside the SQL database.

We moved our web sites to Server Intellect and have found them to be incredibly professional. Their setup is very easy and we were up and running in no time.


Make sure the top box is checked and the bottom box is unchecked and then click Ok. SelectNext in the Configure the Select Statement menu.

The last menu in the wizard to appear is the Test Query menu. You can test your SQL connection by clicking on the Test Query button. The table data you are binding the control to will appear in the preview window if the connection is successful.

Click Finish. Select the FormView Tasks menu again, and notice that now there are some additional selections.

These selections let you customize the control to enable paging, inserting, editing, and deleting of the database information. Save your work then Run or Debug the application.

You now have a functional FormView control you can use to manage the data from the SQL database on your webpages.

Server Intellect assists companies of all sizes with their hosting needs by offering fully configured server solutions coupled with proactive server management services. Server Intellect specializes in providing complete internet-ready server solutions backed by their expert 24/365 proactive support team.

A Few Last Words…

Learning how to control and manipulate databases in ASP.NET is easy and we intend to be there to help you with every step you take! Thank you for being a valued reader and join us next time for additional database tutorials!

FormView.zip


Using the Wizard Control to Create Forms in ASP.NET

The Wizard control is a tool that makes it easy to break up making web forms into easy steps. This tutorial will walk you through the steps of setting up a wizard control that allows you to quickly create forms.

Step 1

Open Visual Studio 2010 or (Or Visual Web Developer 2010 Express) and create a New Empty Website. Make sure the “Place Code in Separate File Box” is checked. Switch to Design View and in the Toolbox under the standard menu, click and drag an instance of the Wizard Control onto the page. In the Smart Tasks Menu of the wizard control select Add/Remove wizard steps.

In the Collection editor Click Add to add one additional Item to the list, and the rename the title of each item to “Your Name”, “Favorite Food”, and “Ready” respectively. See image below:

We migrated our web sites to Server Intellect over one weekend and the setup was so smooth that we were up and running right away. They assisted us with everything we needed to do for all of our applications. With Server Intellect’s help, we were able to avoid any headaches!

Step 2

In the Collection Editor, change the Step Type of Favorite Food to Finish. Change the Step Type of Ready to Complete. Leave the Step Type of Your Name to its default which should be Auto. Click on the Your Name control in the wizard and make sure it is selected. From the Toolbox, click and drag a Label Control and then a TextField Control into the wizard on the page. Make sure you drag the controls into highlighted field in the upper right corner of the wizard, or the controls will not be in the right place.

Change the text property of the label to Your Name (e.g. “Brad Wilson”) and change the ID property of the TextField to “YourName”. Click on the Favorite Food control in the wizard on the page. In the toolbox under the standard menu, click and drag a DropDownList into the wizard. In the smart tasks menu of the DropDownList select Edit Items. When the collection editor opens, click Add three times to add three items to the list, then change the text and value properties of each list to “Pizza”,” Ice Cream”, and “Hot Dogs” respectively. See the image below:

Step 3

Switch to Source View. Inside the last WizardStep labeled “Ready”, drag a Label Control from the toolbox, and rename its ID property to Result. See the code example below:
Code Block
WizardControl.aspx
 <form id="form1" runat="server">
<div>

<asp:Wizard ID="Wizard1" runat="server" ActiveStepIndex="1" Width="500px"
onfinishbuttonclick="Wizard1_FinishButtonClick">
<WizardSteps>
<asp:WizardStep runat="server" title="Your Name">
<asp:Label ID="Label1" runat="server" Text="Type Your Name">asp:Label>
<asp:TextBox ID="YourName" runat="server">asp:TextBox>
asp:WizardStep>
<asp:WizardStep runat="server" StepType="Finish" title="Favorite Food">
<asp:DropDownList ID="FavoriteFood" runat="server">
<asp:ListItem>Pizzaasp:ListItem>
<asp:ListItem>Ice Creamasp:ListItem>
<asp:ListItem>Hot Dogsasp:ListItem>
asp:DropDownList>
asp:WizardStep>
<asp:WizardStep runat="server" StepType="Complete" Title="Ready">
<asp:Label ID="Result" runat="server" Text="Label">asp:Label>
asp:WizardStep>
WizardSteps>
asp:Wizard>

div>
form>

Step 4

Double click the Wizard Control on the page. This will take you to the code behind for that control. Copy and paste the following code into the click event.
Code Block
WizardControl.aspx.cs
        Result.Text = "Your name is " + YourName.Text;
Result.Text += "
Your favorite food is "
+
FavoriteFood.SelectedValue;

The entire code behind should now look like this:

Code Block
WizardControl.aspx.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class WizardControl : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{

}
protected void Wizard1_FinishButtonClick(object sender, WizardNavigationEventArgs e)
{
Result.Text = "Your name is " + YourName.Text;
Result.Text += "
Your favorite food is "
+
FavoriteFood.SelectedValue;
}
}

Save your work then Run or Debug the application.

Type you name in the text field. Select your favorite food type then press the finish button when you are done. The selections you made should now be displayed.

And your all done. Easy right? Join us next time for additional DB tutorials!

We used over 10 web hosting companies before we found Server Intellect. Our new server with cloud hosting,was set up in less than 24 hours. We were able to confirm our order over the phone. They responded to our inquiries within an hour. Server Intellect’s customer support and assistance are the best we’ve ever experienced.