Import a path from Photoshop to InDesign

In this tutorial I am going to show you how to import a path from Photoshop to InDesign, so that you could create with ease silhouettes and stuff.

1.Ok. So first of all open an image in Photoshop.
I choosed Ermac from MK because he seems to have a good silhouette:


2. Choose Pen Tool (P) and in the options palette enable Path and Pen Tool. Start creating your path!


3. Double-click the Workpath from Path Palette to save the path.
You must save your image as .jpeg, .eps or .psd, otherwise your path will be deleted.


4. Open InDesign and place your image in a new document.
With the image selected go to Object-Clipping Path-Options. (Alt+Shift+Ctrl+K). Your type must be Photoshop Type, and your path name should be the one you saved. Click Ok.


5. With the image selected, go to Object-Clipping Path-Convert Clipping Path to Frame


6. Still with the image selected (not the frame), press Backspace. Now your image is deleted, and the path had becomed a frame. You may color it as you like.


Blinking Cat Eyes Animation

In this Photoshop CS5 video tutorial, we will start by creating cats eyes and then animating them by opening and closing. No extra downloads necessary for this tutorial.


Text transition animation

1. Open a new Photoshop document. Create a background layer, I've drew mine using the brush tool.



2. Using the Text Tool(T) draw your text. The text that you'll want to be displayed in different frames must be created in a new layer.





3. Group your text layers (select the layers and press CTRL+G). Duplicate the group by right clicking next to the group name, then clicking Duplicate Group. Name this new group "blur". Select all the layers inside the "blur" group and right click next to one's name and Rasterize Type.



4. Select the first layer in the "blur" group and apply Filter->Blur->Motion Blur.



Click the second layer and press CTRL+F to apply this filter again. Do the same for all the layers inside the blur group.

5. Open Window->Animation. This will be a bit harder then the Speaker Animation . Hide all the layer inside the groups. In the first frame should be visible only the first text-layer from the text group. In the second frame the first layer from the blur group. In the third frame the second layer from the blured group. Now, the same rule applies for the next layers, here's the rule again:
T means normal text, B means blured, the digits are the layer's number.
1T 1B 2B 2T 2B 3B 3T 3B 1B .
I've added the first blured layer on the last frame because the animation will repeat (start again from the begining).
If you've started with 3 text layers, after this step you should have 9frames:



6. To make the animation smoother we must add some Tween between the frames. This part takes some time & attention. You must apply Tween only between the 9frames created before. To apply Tween , click on one frame, then SHIFT+CLICK the frame next to it to select both frames, after that click the Tween button (the one next to the Duplicate Selected Frames button). Tween using 2 frames.



7. After you did the previous step for all the 9 frames ( that means 8 times), you only have to change the delay time for the frames 1T,2T and 3T (as noted in step 5) to 0.30sec or something like that. To save the animation go to File->Save for Web and Devices (ALT+SHIFT+CTRL+S) choose GIF and save.

You can download the .PSD from HERE .:).


Water mark on image with asp.net

In this article I'll show you making of water mark on image with asp.net. Make two folders on server tmp and images. In default.aspx take three controls Label, Fileupload and Button as given below:
Now double click on btnSave, default.aspx.cs page will open with btn click event.

protected void btnSave_Click(object sender, EventArgs e)
{
}



In default.aspx.cs add following namespaces with other given namespaces.
using System.IO;
using System.Drawing;
using System.Drawing.Drawing2D;

//and now make a method for water mark

protected void WaterMark(string FileName)
{
string path =Server.MapPath( "~/tmp/"+FileName);
string watermark = "abc.com";
Bitmap objBmp;
objBmp = new Bitmap(path);
Graphics objGraphics;
try
{
objGraphics = Graphics.FromImage(objBmp);
}
catch
{
objBmp = new Bitmap(objBmp.Width, objBmp.Height);
objGraphics = Graphics.FromImage(objBmp);
objGraphics.DrawImage(objBmp, new Rectangle(0, 0, objBmp.Width, objBmp.Height), 0, 0, objBmp.Width, objBmp.Height, GraphicsUnit.Pixel);
}
int size = (objBmp.Width / watermark.Length);
System.Drawing.StringFormat Format = new System.Drawing.StringFormat(StringFormatFlags.NoWrap);
objGraphics.DrawString(watermark, new Font("Arial", size, FontStyle.Bold), new SolidBrush(Color.FromArgb(60, 255, 255, 255)), 0, 0 Format);
objBmp.Save(Server.MapPath( "~/images/"+FileName));
}


Now write write coding on btnSave click event
protected void btnSave_Click(object sender, EventArgs e)
{

string extension=Path.GetExtension(fileUpload.FileName);

switch (extension.ToLower())
{case ".jpg":
case ".jpeg":
case ".png":
case ".gif":
fileUpload.SaveAs(Server.MapPath("~/tmp/"+fileUpload.FileName));
WaterMark(fileUpload.FileName);
lbl.Text = "File is saved with water mark.";
break;
default:
lbl.Text = "Given file is not an image file";
break;
}
}
Now try it.


Making thumbnail dynamically with ashx file in asp.net

In this article I am going to show how to resize image dynamically or making thumbnail dynamically with ashx file.Start new website project give name thumbnail.In menu go to Webite > Add new item and select Generic Handler. Name it Handler.ashx, You will get auto generated code in it like given below:

<%@ WebHandler Language="C#" Class="Handler" %>

using System;
using System.Web;

public class Handler : IHttpHandler {

public void ProcessRequest (HttpContext context) {
context.Response.ContentType = "text/plain";
context.Response.Write("Hello World");
}

public bool IsReusable {
get {
return false;
}
}

}


Now add given namespace to handle the image files
using System.IO;
using System.Drawing;
using System.Drawing.Imaging;

Make a new folder for images files, name it images. Put some images in this folder.

Now our next step is getting the height , width , image name and changing image size.
To do these things, here query string is used. In ProcessRequest method write follwing lines.


public class Handler : IHttpHandler {

public void ProcessRequest (HttpContext context) {
// for new height of image
int h=int.Parse(context.Request.QueryString["h"].ToString());
// for new width of image
int w = int.Parse(context.Request.QueryString["w"].ToString());
// for image file name
string file = context.Request.QueryString["file"].ToString();

// Path of image folder where images files are placed
string filePath = context.Server.MapPath("~/images/" + file);

// Resize proccess
using(System.Drawing.Image img=System.Drawing.Image.FromFile(filePath))
{
Bitmap objBmp = new Bitmap(img,w, h);
string extension = Path.GetExtension(filePath);
MemoryStream ms;
byte[] bmpBytes;
switch (extension.ToLower())
{
case ".jpg":
case ".jpeg":
ms = new MemoryStream();
objBmp.Save(ms, ImageFormat.Jpeg);
bmpBytes = ms.GetBuffer();
context.Response.ContentType = "image/jpeg";
context.Response.BinaryWrite(bmpBytes);
objBmp.Dispose();
ms.Close();
context.Response.End();
break;
case ".png":
ms = new MemoryStream();
objBmp.Save(ms, ImageFormat.Png);
bmpBytes = ms.GetBuffer();
context.Response.ContentType = "image/png";
context.Response.BinaryWrite(bmpBytes);
objBmp.Dispose();
ms.Close();
context.Response.End();
break;
case ".gif":
ms = new MemoryStream();
objBmp.Save(ms, ImageFormat.Gif);
bmpBytes = ms.GetBuffer();
context.Response.ContentType = "image/png";
context.Response.BinaryWrite(bmpBytes);
objBmp.Dispose();
ms.Close();
context.Response.End();
break;

}
img.Dispose();
}

}

Now we move to Default.aspx page, drag here Image tool from tool box :

For retriving the image set ImageUrl as given below with height width and image name.

And now finally run the default.aspx and see the result.



Sending email using Oracle procedures.

This is a post to share that how to sending out email by using oracle procedures. Some of the time. As a developer, I would like this receive some notification email from my procedures, so that I could know that the procedures is running & how many records had been update/inserted.

Below is the same procedures coding.


CREATE OR REPLACE
PROCEDURE TEST
AS
l_mailhost VARCHAR2(64) := ‘‘;
l_from VARCHAR2(64) := ‘XXXXX’;
l_to VARCHAR2(64) := ‘XXXXX’;
l_mail_conn UTL_SMTP.connection;

BEGIN
l_mail_conn := UTL_SMTP.open_connection(l_mailhost, 25);
UTL_SMTP.helo(l_mail_conn, l_mailhost);

– For Authenication
UTL_SMTP.command(l_mail_conn,’AUTH LOGIN’);
UTL_SMTP.command(l_mail_conn, UTL_RAW.CAST_TO_VARCHAR2(
UTL_ENCODE.BASE64_ENCODE(
UTL_RAW.CAST_TO_RAW(‘USERNAME’)
)
));
UTL_SMTP.command(l_mail_conn, UTL_RAW.CAST_TO_VARCHAR2(
UTL_ENCODE.BASE64_ENCODE(
UTL_RAW.CAST_TO_RAW(‘PASSWORD‘)
)
));
– For Authenication

UTL_SMTP.mail(l_mail_conn, l_from);
UTL_SMTP.rcpt(l_mail_conn, l_to);

UTL_SMTP.open_data(l_mail_conn);

UTL_SMTP.write_data(l_mail_conn, ‘Date: ‘ || TO_CHAR(SYSDATE, ‘DD-MON-YYYY HH24:MI:SS’) || utl_tcp.CRLF);
UTL_SMTP.write_data(l_mail_conn, ‘From: ‘ || l_from || utl_tcp.CRLF);
UTL_SMTP.write_data(l_mail_conn, ‘Subject: ‘ || ‘test’ || utl_tcp.CRLF);
UTL_SMTP.write_data(l_mail_conn, ‘To: ‘ || l_to || utl_tcp.CRLF);
UTL_SMTP.write_data(l_mail_conn, ” || utl_tcp.CRLF);

UTL_SMTP.write_data(l_mail_conn, ‘test’);

UTL_SMTP.close_data(l_mail_conn);

UTL_SMTP.quit(l_mail_conn);
END TEST;


Introduction to Customizing AutoCAD

Concept:
One of the great things about AutoCAD is that it can be easily customized to suit the individual user. By now, you have seen how you can change the osnaps for example, but you can change a lot more than that. This lesson will introduce you to some of the customization options you have.

Keyboard Shortcuts (you will need to have the express tools installed)

So far you have been using AutoCAD's default shortcuts. This section will show you how you can create your own to help your productivity. All shortcuts are stored in the acad.pgp file. This file is loaded into AutoCAD every time you start the program. It is now easy to edit thanks to an express tool names ALIASEDIT.

Type in this command and you'll see a dialog box pop up. Press the Add button.

Aliasedit in AutoCAD 2010

In this example, I have created a shortcut for MATCHPROP which is usually MA (I find that two keys on opposite sides of the keyboard slow me down). Since N is not used for anything, I find that one letter is more than twice as fast as two. Type in what you see and press OK.

Now press Apply so that the changes take effect. You'll see this dialog box warning you that you are about to overwrite your acad.pgp file. Press yes, ONLY if you are sure you did the correct changes.

Alias edit change

Press Yes and you will see a message pop up that you have saved your changes and that your current AutoCAD session has been updated. That means that you can now use the shortcut you just added.

CUSTOMIZING THE INTERFACE

Quick Access Toolbar

The quick access toolbar is the row of icons at the top of the screen. You'll find Save, Print and other common commands there. One that you won't find is Save as. This is a pet peeve of mine, so I added it. It's easy and you can do it to. Use this method for adding any commands to this toolbar.

Navigate the Ribbon to Management > Customization > User Interface. You'll see this dialog box come up.

CUI in AutoCAD 2010

In the top left section, look for the Quick Access Toolbar 1 folder. Then look for the Save as command in the list in the bottom left. Drag the command up to it's desired position on the toolbar. Press Apply. Your toolbar should now look like this.

Save as added to CUI

If you have read all the tutorials, you'll know that I don't recommend using icons. Still there are sometimes you may want to. Perhaps the command isn't used much, but you want easy access to it. Perhaps you can't create a shortcut for the command. There could be a few reasons, but here is how to create a new toolbar with the icons you want.

With the CUI dialog box open, right click on Toolbars and select New Toolbar.

Custom User Interface

Once you have your toolbar added to the list, drag a command up to it. I've decided that I want to have a toolbar with an Update Dimensions on it to save me some typing. Once you have some commands on your toolbar, press Apply to see your new toolbar.

Now you will add icons to your new toolbar. Right-click a toolbar and select Customize again. You'll see all the commands listed. You can now drag and drop an icon from that list to your custom toolbar. For this exercise, look at the list for commands you don't recognize and add them to your toolbar so you can try them out.

Right-Click Customization

You can also control how your mouse works. By default AutoCAD displays a menu when you right click outside of a command. To do this, type OP for options and go to the user preferences tab. Select the "Right-Click Customization" button. You'll see this dialog box.

Right-Click Customization

For example, you should find that using right-click as and 'enter' will speed things up. Unless you frequently use the menus, you should switch to this.

These are just a few ways that AutoCAD can be customized. You can create custom hatch patterns and linetypes - even fonts. Other options include programming to automate tedious tasks in VisualLisp, VBA or C++(ARX). As you get more familiar with AutoCAD, look into these options.