Está en la página 1de 54

MULTIMEDIA LAB EXERCISES

Ex No:1

IMPLEMENTATION OF TEXT COMPRESSION USING


RUN LENGTH ENCODING

AIM:
To write a program to perform text compression algorithm using run length encoding
technique.
ALGORITHM:

Start the program.


Write some text in the input file
Using the text in input file & compress the content using run length encoding technique
Write the compressed text (i.e.) translated into another form into output file
Stop the execution.

PROGRAM:
#include<stdio.h>
#include<conio.h>
void main()
{
FILE *fp1,*fp2;
int i=1;
char a,c;
clrscr();
fp1=fopen("a.txt","r");
fp2=fopen("b.txt","w");
a=getc(fp1);
while(!feof(fp1))
{
c=fgetc(fp1);
if(c==a)
{
a=c;
i++;
}
else
{
fprintf(fp2,"%d%c",i,a);
a=c;
i=1;
}
}
printf("successfully compressed");
1

fclose(fp1);
fclose(fp2);
getch();
}
INPUT :
a.txt
______
Aaabbb

OUTPUT:
b.txt
_____
3a3b

Successfully compressed

RESULT:
Thus the above program performed successfully and the output is verified.

Ex no:2

IMPLEMENTATION OF TEXT COMPRESSION USING PACKET


TEXT METHOD

AIM:
To write a program to perform text compression algorithm using packet text method in C
language.
ALGORITHM:
Start the program.
Write some text in the input file
Using the text in input file & compress the content using packet text method.
Write the compressed text (i.e.) translated into another form into output file.
Stop the execution.
PROGRAM:
#include <stdio.h>
#include <string.h>
#include <stdbool.h>
#define RESULTSTRINGMAXLENGTH 255
int packtext(char *text, const bool compress);
int main(void)
{
int original;
char text[]="Quidquid latine dictum sit, altum viditur.";
original=strlen(text);
printf("%s length=%ld\n",text,strlen(text));
packtext(text,true);
printf("compressed length=%ld\nCompression
Ratio=%.0f%%\n",strlen(text),
(float)strlen(text)/original*100);
packtext(text,false);
printf("String Restored: %s length=%ld",text,strlen(text));
return 0;
}
int packtext(char *text, const bool compress)
{
const char dictionary[]=" e as tinthouerhet anreesr d onn or o i y wo tontyo. neisarteed, ctiy
bat snd fal pensestvengitu talehaurllcousa mf dfoof siril hmeg om Icehironsasiossbedepe rli
Tetel nicho lilprcactutThpaeceachh wige ebuaisursulmawaotowtsmploI solyee Cunm rtieno
Sdiwhs.rafincademe.irplk ury Pwoacos gams,duayavucColamowe Aoopu";
int counter,resultcounter=0;
if (strlen(dictionary) != 320)
{
printf("ERROR: Dictionary has the wrong size\n");
return 2;
}
if (compress)
3

{
int dictsearch;
for (counter=0; counter < strlen(text); counter++)
if (text[counter] < 32 || text[counter]==127)
{
printf("ERROR: String contains characters with values out of
range");
return 1;
}
for (counter=0; counter < strlen(text); counter++, resultcounter++)
{
for (dictsearch=0; dictsearch < strlen(dictionary); dictsearch+=2)
if (text[counter]==dictionary[dictsearch] &&
text[counter+1]==dictionary[dictsearch+1])
break;
if (dictsearch < strlen(dictionary)) // we found the characters that we want
{
text[resultcounter]=dictsearch/2+96;
counter++;
}
else
text[resultcounter]=text[counter]-31;
}
text[resultcounter]='\0';
}
else //uncompress
{
char result[RESULTSTRINGMAXLENGTH];
for (counter=0; counter < strlen(text); counter++,resultcounter++)
{
if (text[counter]<96 && text[counter] > 0)
result[resultcounter]=text[counter]+31;
else
{
if (text[counter]>95)
{
result[resultcounter]=dictionary[((int)text[counter]-96)*2];
resultcounter++;
result[resultcounter]=dictionary[((int)text[counter]-96)*2+1];
}
else
{
result[resultcounter]=dictionary[(160+text[counter])*2];
resultcounter++;
result[resultcounter]=dictionary[(160+text[counter])*2+1];
}
}
4

}
result[resultcounter]='\0';
strcpy(text,result);
}
return 0;
}
INPUT :
a.txt
______
Aaaaaabbb

OUTPUT:
b.txt
_____
6a3b

Successfully compressed

RESULT:
Thus the above program performed successfully and the output is verified.

Ex no:3

IMPLEMENTATION OF IMAGE COMPRESSION

AIM:
To write a c program to perform image compression algorithm.
ALGORITHM:

Start the program.


Open the bmp file in read mode.
Compress the content of the bmp file.
Print the compressed text another file.
Stop the execution.

PROGRAM
#include<stdio.h>
#include<conio.h>
void main()
{
FILE *fp1,*fp2;
int i=1;
char a,c;
clrscr();
fp1=fopen("rose.jpg","r");
fp2=fopen("bb.jpg","w");
a=fgetc(fp1);
while(!feof(fp1))
{
c=fgetc(fp1);
if(c==a)
{
a=c;
i++;
break;
}
else
{
fprintf(fp2,"%d%c",i,a);
a=c;
i=1;
}
}
printf("\n successfully compressed");
fclose(fp1);
fclose(fp2);
getch();
}
6

INPUT FILE:
rose.jpg
bb.jpg
OUTPUT:

Successfully compressed

RESULT:
Thus the above program performed successfully and the output is verified.

Ex no:4

IMPLEMENTATION OF IMAGE COMPRESSION USING HUFFMAN


CODING

AIM:
To write a Java program to perform image compression algorithm using Huffman coding.
ALGORITHM:
Start the program.
Open the bmp file in read mode.
Compress the content of the bmp file using Huffman coding technique.
Print the compressed text another file.
Stop the execution.
PROGRAM
File: HuffmanRunner.java
import java.awt.image.BufferedImage;
import java.awt.image.DataBuffer;
import java.io.DataOutputStream;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import javax.imageio.ImageIO;
public class HuffmanRunner
{
public static void main(String[] args) throws IOException
{
int numIntensities = 256;
int numPixels = 512*512;
BufferedImage image = ImageIO.read(new File("../lena.bmp"));
int[] histogram = getHistogram(image, numIntensities);
Huffman coder = new Huffman(histogram, numPixels, numIntensities);
String[] codes = coder.getCodes();
int[] codedImage = getCodedImage(codes, image);
FileOutputStream fos = new FileOutputStream(new File("output.dat"));
DataOutputStream dos = new DataOutputStream(fos);
for(int i : codedImage)
{
dos.writeInt(i);
}
dos.close();
fos.close();
}
8

public static int[] getCodedImage(String[] codes, BufferedImage image)


{
DataBuffer imageData = image.getRaster().getDataBuffer();
int[] codedImage = new int[imageData.getSize()];
for(int i = 0; i < imageData.getSize(); i++)
{
codedImage[i] = Integer.parseInt(codes[imageData.getElem(i)], 2);
}
return codedImage;
}
public static double averageCodeLength(String[] codes)
{
int totalLength = 0;
for(String s : codes)
{
totalLength += s.length();
}
return (double)totalLength / (double)codes.length;
}
public static int[] getHistogram(BufferedImage image, int numIntensities)
{
int[] histogram = new int[numIntensities];
DataBuffer imageData = image.getRaster().getDataBuffer();
for(int i = 0; i < imageData.getSize(); i++)
{
histogram[imageData.getElem(i)]++;
}
return histogram;
}
}
File: Huffman.java
import java.util.ArrayList;
import java.util.Comparator;
import java.util.PriorityQueue;
import java.util.Stack;
public class Huffman
{
private PriorityQueue<HuffmanNode>huffmanQueue = new PriorityQueue<HuffmanNode>
(256, new HuffmanComparator());
private int frequencies[];
private double probs[];
private int numPixels;
private int numSymbols;
9

private HuffmanTree tree;


private ArrayList<HuffmanCode> codes;
public Huffman(int frequencies[], int numPixels, int numSymbols)
{
this.frequencies = frequencies;
this.probs = new double[numSymbols];
this.numPixels = numPixels;
this.numSymbols = numSymbols;
this.tree = null;
this.codes = null;
}
public String[] getCodes()
{
generateProbs();
fillQueue();
generateTree();
generateCodes();
String[] huffmanCodes = new String[this.numSymbols];
for(HuffmanCode c : this.codes)
{
huffmanCodes[c.getSymbol()] = c.getCode();
}
return huffmanCodes;
}
private void generateProbs()
{
for(int i = 0; i < this.frequencies.length; i++)
{
this.probs[i] = (double)this.frequencies[i] / (double)this.numPixels;
}
}
private void fillQueue()
{
for(int i = 0; i < probs.length; i++)
{
HuffmanNode tempNode = new HuffmanNode();
tempNode.setSymbol(i);
tempNode.setWeight(this.probs[i]);
this.huffmanQueue.add(tempNode);
}
}
private void generateTree()
{
while(this.huffmanQueue.size() > 1)
{
HuffmanNode newRight = this.huffmanQueue.remove();
10

HuffmanNode newLeft = this.huffmanQueue.remove();


HuffmanNode newParent = new HuffmanNode();
newParent.setWeight(newLeft.getWeight() + newRight.getWeight());
newParent.setLeft(newLeft);
newParent.setRight(newRight);
newLeft.setParent(newParent);
newLeft.setCodePortion("0");
newRight.setParent(newParent);
newRight.setCodePortion("1");
this.huffmanQueue.add(newParent);
}
HuffmanTree newTree = new HuffmanTree();
newTree.setRoot(this.huffmanQueue.remove());
this.tree = newTree;
}
private void generateCodes()
{
ArrayList<HuffmanCode>codes = new ArrayList<HuffmanCode>();
Stack<HuffmanNode>iterationStack = new Stack<HuffmanNode>();
iterationStack.push(this.tree.getRoot());
while(!iterationStack.isEmpty())
{
HuffmanNode tempNode = iterationStack.pop();
if(tempNode.left != null)
{
iterationStack.push(tempNode.left);
}
if(tempNode.right != null)
{
iterationStack.push(tempNode.right);
}
if(tempNode.getSymbol() != -1)
{
codes.add(new HuffmanCode(getCodeFromNode(tempNode),
tempNode.getSymbol()));
}
}
this.codes = codes;
}
private String getCodeFromNode(HuffmanNode node)
{
String tempString = "";
HuffmanNode currentNode = node;
while(currentNode.getParent() != null)
{
tempString = currentNode.getCodePortion() + tempString;
currentNode = currentNode.getParent();
}
11

return tempString;
}
private class HuffmanCode
{
private String code;
private int symbol;
public HuffmanCode(String code, int symbol)
{
this.code = code;
this.symbol = symbol;
}
public String getCode()
{
return this.code;
}
public int getSymbol()
{
return this.symbol;
}
}
private class HuffmanComparator implements Comparator<HuffmanNode>
{
@Override
public int compare(HuffmanNode o1, HuffmanNode o2)
{
return new Double(o1.getWeight()).compareTo(new
Double(o2.getWeight()));
}
}
private class HuffmanNode
{
private double weight;
private int symbol;
private HuffmanNode parent;
private HuffmanNode left;
private HuffmanNode right;
private String codePortion;
public HuffmanNode()
{
this.weight = -1.0;
this.symbol = -1;
this.parent = null;
this.left = null;
12

this.right = null;
this.codePortion = "";
}
public double getWeight()
{
return this.weight;
}
public void setWeight(double newWeight)
{
this.weight = newWeight;
}
public int getSymbol()
{
return this.symbol;
}
public void setSymbol(int newSymbol)
{
this.symbol = newSymbol;
}
public HuffmanNode getParent()
{
return this.parent;
}
public void setParent(HuffmanNode newParent)
{
this.parent = newParent;
}
public void setLeft(HuffmanNode newLeft)
{
this.left = newLeft;
}
public void setRight(HuffmanNode newRight)
{
this.right = newRight;
}
public String getCodePortion()
{
return this.codePortion;
}
public void setCodePortion(String newCodePortion)
{
13

this.codePortion = newCodePortion;
}
}
private class HuffmanTree
{
private HuffmanNode root;
public HuffmanTree()
{
root = null;
}
public HuffmanNode getRoot()
{
return this.root;
}
public void setRoot(HuffmanNode newRoot)
{
this.root = newRoot;
}
}
}

INPUT IMAGE:

14

INPUT :
w.jpg
OUTOUT:
bb.jpg
Successfully compressed

RESULT:
Thus the above program performed successfully and the output is verified.

15

Ex no:5

IMPLEMENTATION OF IMAGE COMPRESSION USING LOSSLESS AND


LOSSY PREDICTIVE CODING

AIM:
To write a Java program to perform image compression algorithm using Lossless and
Lossy Predictive Coding.
ALGORITHM:
Start the program.
Open the bmp file in read mode.
Compress the content of the bmp file using Lossless and Lossy Predictive
Coding.
Print the compressed text another file.
Stop the execution.
PROGRAM
File: Start.java
import java.awt.image.BufferedImage;
import java.awt.image.DataBuffer;
import java.io.IOException;
public class Start {
/**
* @param args
*/
public static void main(String[] args) {
PredictiveLossless p = new PredictiveLossless();
BufferedImage bi=null;
try {
bi = p.getImage();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
//p.writetToFile(p.getData(bi));
p.writetToFile(p.compressLossy(p.getData(bi)));
System.out.println(292*267/8);
}
}

16

File: PredictiveLossless.java
import java.awt.image.BufferedImage;
import java.awt.image.DataBuffer;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import javax.imageio.ImageIO;
public class PredictiveLossless {
public int step=2;
public BufferedImage getImage() throws IOException {
BufferedImage bi = ImageIO.read(new File("pikachu.bmp"));
return bi;
}
public byte[] getData(BufferedImage bi) {
DataBuffer db = bi.getRaster().getDataBuffer();
byte[] b = new byte[db.getSize()];
for (int i=0;i < db.getSize();i++) {
b[i]=(byte) db.getElem(i);
}
return b;
}
public void writetToFile(byte[] b) {
System.out.println(b.length);
File f = new File("data.bin");
FileOutputStream fout=null;
try {
fout = new FileOutputStream(f);
} catch (FileNotFoundException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
try {
fout.write(b);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
public byte[] compress(byte[] b) {
byte[] b2 = new byte[b.length];
for (int i=0;i < b.length;i++) {
if (i==b.length-1) {
b2[i]=b[i];
} else {
17

b2[i]=(byte) (b[i+1]-b[i]);
}
}
return b2;
}
public byte[] compressLossy(byte[] b) {
int current=0;
byte[] b2 = new byte[b.length];
for (int i=0;i < b.length;i++) {
if (i==b.length-1) {
b2[i]=b[i];
} else {
if (b[i]>=current) {
b2[i]=1;
current+=step;
} else {
current-=step;
b2[i]=0;
}
}
}
return b2;
}
}
INPUT FILE:
w.jpg
OUTPUT:
bb.jpg
Successfully compressed

RESULT:
Thus the above program performed successfully and the output is verified.

18

EX NO: 6

IMAGE EDITING USING ADOBE PHOTOSHOP USING FILTER

AIM:
To develop a filter image using adobe photoshop
ALGORITHM:
Open adobe photoshop 1.0.
Select the file menu -> click open -> browse a picture
Select filter menu from the title bar
Select filter option -> blur -> radial blur
Set the appropriate radial to blur the picture and click ok

19

INPUT:

20

OUTPUT:

21

Ex No:7

IMAGE EDITING USING ADOBE PHOTOSHOP USING PATTERN

AIM
To generate a repeated pattern of image using adobe photoshop
ALGORITHM
Select the file menu and then click open for a sample picture
Select filter menu from the menu bar
Choose pattern maker from the filter menu
New window will be opened and the browsed image will be present
Select a pattern of the picture and click generate
Finally a pattern of image will be displayed.

22

INPUT:

23

OUTPUT:

24

Ex No:8

ANIMATION CREATION GROWING MOON

AIM
To create an animation to represent the growing moon.
PROCEDURE

Open flash 8 software -> click on flash document->go to windows->properties


->select the properties tool-> choose the Background to black.

Go to fill color under tool bar-> select the white color.

Select the oval tool in order to draw the moon. u will get a white circle.

Select the oval tool in order to draw the moon. u will get a white circle.

Select the white circle on the worksheet using the selection tool->right click>convert to symbol->select movie clip->give suitable name eg: moon->click ok.

Go to filter->click on the + symbol->select glow to apply glowing effect-> select the


color to white under glow and adjust the blur x/blur y values.

Click on the + symbol again and chose blur-> again adjust the blur x/blur y values.

Place the moon where ever you want on the work area.double click on layer 1 and
rename as MOON.

Insert another layer->rename it as Animation.

Select the fill color to black-> select oval tool and draw a circle on the moon to cover
the moon->select the newly added circle-> right click-> convert to symbol-> movie
clip-> name it as Animation.

Go to filter-> select + symbol->give the glow and blur effect as did for moon.

Select the 150th frame in moon layer->right click->insert key frame.


repeat the same for Animation layer.

Click on the 149th keyframe of animation layer ->right click->press create motion->
select the animation movie clip and move slowly across the moon.
25

OUTPUT:

26

.
Ex No:9

ANIMATION CREATION BOUNCING BALL

AIM
To create an animation to indicate a ball Bouncing on steps.
PROCEDURE

Go to start- macromedia- click on flash document

Select the line tool and draw the steps. colour it using the paint bucket tool

Select the circle from the tool bar and create a circle on the work area.

Now fill the colour to the circle using the paint bucket tool from the tool bar.

Go to frames right click on the first frame and choose insert key frame.

Slightly move the ball. Repeat the same procedure by adding new key frames to
show the ball change the shape of the ball slightly when it touches the surface.

In order to change the shape use the free transform tool.

Go to control and click on test movies .you will observe the ball bouncing on steps.

27

OUTPUT

28

Ex No:10

ANIMATION CREATION CLOUD MOVEMENT

AIM
To simulate movement of a cloud.
PROCEDURE

Go to start- macromedia- click on flash document.

Create a blue background in layer 1.

Now insert a layer 2 and draw the clouds in this layer.

In order to create the clouds, go to tool bar and select pencil option, draw the cloud in
layer2.

Fill the colour to the cloud, right click on it- choose convert to symbol option- give the
name as cloud.

Select the movie clip option and click ok.

Go to filter->click on the + symbol->select glow to apply glowing effect-> select the


colour to white.

Under glow and adjust the blur x/blur y values.

Give the appropriate blur effect to the cloud.

Go to frames, insert key frame on both the layer, create the motion tween on 2 nd layer
and move the clouds.

Finally go to control->click on test movies.

29

OUTPUT

30

:
.

Ex No:11

ANIMATION CREATION TABLE FAN

AIM

To draw the fan blades and to give the proper animation


PROCEDURE

Go to start-> macromedia-> click on flash document

Create a background on layer 1.

Insert another layer-> draw only fan blades and its circle.

Insert another layer and draw fan stand.

On each layer right click on frames and insert key frames.

Select the fan blades layer and insert new key frame-> select the fan blades by free
transform tool and rotate the circle a little bit.

Repeat the rotation until you get the fan rotation animation

Go to control->test movie to see the animation.

31

OUTPUT:

32

Ex No:12

ANIMATION CREATION WELCOME

AIM
To create an animation with the following features.
WELCOME
* Letters should appear one by one
* The fill colour of the text should change to a different colour after
the display of the full word.
PROCEDURE

Go to start->Macro Media-click on Flash document.

Choose the textbox from the tool bar. Type the word as WELCOME on layer1.

Select the complete word, increase its Font size and change the colour.

In the timeline window, select the 1st frame-Right click on it-choose insert key frame.

Now delete a last letter {E} and change the colour of the remaining word.

Repeat the above procedure till you delete every word in WELCOME.

Now select all the key frames->Right click ->choose Reverse key frames.

After reversing the frames copy the last frame and paste on its next. now in the new
frame

Select all the complete word welcome and change the colour.

33

Finally, go to control-click on test movie you will get the required animation.

OUTPUT:

34

Ex No:13

ANIMATION CREATION BALL HITTING

AIM
To simulate a ball hitting another ball.
PROCEDURE

Go to start->Macro Media-click on Flash document.

Choose the circle option displayed in the toolbar. create two circle at the opposite ends.

Go to frames-> right click on the 1st blank frame and click insert key frames.

Select the 1st ball and make it to move towards the other till it touches.

Change the shape of the ball using free transform tool as soon as the two ball touches

Each other. after hitting each other make them to move towards opposite direction.

Before moving to the opposite direction bring back the balls to its original shapes.

Finally test the animation by selecting control->movie clip.

35

OUTPUT:

36

.
Ex No:14

CREATING ANIMATION CURSOR

AIM
To create an animated cursor using startdrag("ss",True); mouse.hide();
PROCEDURE

Go to start->macro media-click on flash document

Insert or draw any object of your choice for example butterfly in this example.

Using free transform tool select the object-right click-convert to symbol- select movie
Clip- give the name(mm)- click ok.

Enter the instance name as (mm) using the property tool box.(same as the movie clip
Name).

Select the object using free transform tool- go to modify-> timeline->distribute to


Layers.

Select layer1 and rename it to action


37

Select the first key frame in the action layer- go to windows- click action.

You will get action frame- enter the following code in the action frame.
Mouse.hide();
This.mm.onenterframe=function() {
Startdrag(this,true);
};

To run the animation go to control-> movie clip.

OUTPUT:

38

Ex No:15

IMAGE EDITING

AIM
To extract the flower only from given Photographic image and organize it on a
background. Selecting your own background for organisation.
PROCEDURE

Open adobe Photoshop 7.0-> file->open-> choose a file and open it.

Select the flower from the image using the lasso tool.

Go to edit-> copy->Again go to file->new->give height 500 and width 500.

Choose appropriate background and foreground colour from the tool bar.

Go to edit->fill->under use select background colour->ok.

Go to edit->paste.

39

OUTPUT:

40

41

42

Ex No:16

IMAGE EDITING BRIGHTNESS & CONTRAST

AIM
To adjust the brightness and contrast of the picture so that it gives an elegant look.
PROCEDURE

Open adobe Photoshop 7.0-> file->open-> choose a file and open it.

Go to image->adjustments->Brightness/Contrast.

After getting the Brightness/Contrast window adjust the brightness and contrast by
Dragging the appropriate bar setting.

Finally save the image file.

43

OUTPUT:

44

Ex No:17

IMAGE EDITING REMOVAL OF A PART

AIM
To remove the arrows and text from the given photographic image.
PROCEDURE

Open adobe Photoshop 7.0-> file->open-> choose a file with arrows and some
text -> open it.

Select the arrows from lasso tool from the tool bar which you want to delete->go
to edit-> cut.

Select the text on the image using text tool and press delete.

Save the file.

45

OUTPUT:
Original image

After removing arrows and text

46

Ex No:18

IMAGE EDITING MERGING OBJECTS

AIM

To use appropriate tool(s) from the toolbox, cut The objects from 3 files (f1.jpg, f2.jpg &
f3.jpg); organise them in a single file and apply feather effects.
PROCEDURE

Open adobe Photoshop 7.0-> file->open f1.jpg.

Select the flower in it using lasso tool ->right click->feather-> give feather radius 20

pixels.

Go to edit-> copy-> open a new file with height 500 and width also 500->paste the

flower.

Repeat the same procedure for f2.jpg and f3.jpg-> select the flower ->give feather effect>edit->copy-> open a new file-> paste.

You will get o final single file with 3 flowers from different files.

Save the new file.

47

OUTPUT

F1.JPG

F2.JPG

F3.JPG

FINAL IMAGE

48

Ex No:19

IMAGE EDITING DISPLAY NAME WITH BACKGROUND

AIM

To display the background given (filename:garden.jpg) through your name using mask.
PROCEDURE

Go to start-> macromedia-> click on flash document

Go to file-> import->open external library-> select a background image

Click open.

The selected image will be stored in your library. Open library and drag the image on the

work area by selecting the image.

Go to view->zoom out->resize the picture such that it should fit the work area.

Insert layer2. choose the text tool from the toolbar and type your name.

Select the text to change its font size and colour of your choice. place the text on the left
of the workarea.

Right click on the 70th keyframe of layer 2 and insert a keyframe. move the text to the
right side of the workarea->right click on the 69th frame of layer 2-> choose create
motion tween.

Right click on layer 2 choose the option mask.

Go to control->test movie to see the animation.

49

OUTPUT:

50

Ex No:20

IMAGE EDITING CHANGE PART OF A PICTURE

AIM
To make anyone of one of the parrots black & White in a given picture.
PROCEDURE

Open adobe Photoshop 7.0-> file->open original parrot picture.

Select a parrot using lasso tool from the tool bar.

After selection->go to image-adjustments->desaturate.

Then selected picture will now turn to black and white.

Save as modified image.

51

OUTPUT
Original picture

Modified picture

52

Ex No:21

IMAGE EDITING CHANGING SHAPE

AIM
To change a circle into a squre using flash.
PROCEDURE

Go to start->macromedia->flash document
Select the circle tool from the tool bar. draw a circle on the work area.colour it
Click on the 40th key frame-> insert new key frame.
Selecting the last key frame->draw a rectangle on the circle by selecting the rectangle
tool bar so that it will cover the circle. colour the rectangle by the different colour.
Again click on the last frame->under properties->under tween->change the option
shape from none.
Then again select the last but one frame->go to properties->tween->change to shape.
Go to control->test movie->see the circle changing in to rectangle.

53

OUTPUT

54

También podría gustarte