Presentation is loading. Please wait.

Presentation is loading. Please wait.

Download JES Tool JES: Jython Environment for Students

Similar presentations


Presentation on theme: "Download JES Tool JES: Jython Environment for Students"— Presentation transcript:

1 Download JES Tool JES: Jython Environment for Students
Python development tool developed by Georgia Tech Download and install JES at C:/100 Select Jes windows.zip

2 Unzip JES Tool Right-click on the zip file in Downloads folder, select ‘Extract All’

3 Select unzip folder Select C:\100 to unzip

4 Download media files Under C:\100, you should have
Create a new folder pics under C:\100 Download Save into C:\100\pics Right click and select 7-zip &‘Extract here.” Under C:\100, you should have C:\100\jes windows C:\100\pics (folder) Make a desktop shortcut to jes windows\JES.exe (Python head icon)

5 Python/JES JES IDE (Integrated Development Environment)
Incorporates editing environment Program pane Command pane Watcher button to view debugging

6 Picture Functions in JES
Identify a picture and NAME it Determine width and height of the picture Do operation on a pixel, propagating the same operation over the entire picture

7 1. How to access a Picture in JES ?
Select a picture file For example, myFile = pickAFile() WARNING: picture file (eiffel.jpg) is NOT a picture A picture file HAS TO BE converted to a picture object myPic = makePicture(myFile) Or, myPic = makePicture(pickAFile())

8 2. Get Picture Dimension pWid = myPic.getWidth()
pHgt = myPic.getHeight()

9 3. Image Processing Negative B/WReduce Red Sunset Posterize Redeye
Sepia-tone Mirror Symmetry Background substitution – chromakey Edge Detection Rotate Scale up or down a picture

10 Access a Pixel in a picture
pixel = picture.getPixel(x,y) Given a pixel px, Get individual colors: px.getRed(), px. getGreen(), px.getBlue() Set new colors: px.setRed(255), … Work with a color in (R,G,B) myG = makeColor(0,255,0) px.setColor(myG) myColor = px.getColor() myColor = pickAColor()

11 Example >>> pic = makePicture(pickAFile())
>>> pix = pic.getPixel(1,1) >>> print pix Pixel, color=color r=168 g=131 b=105 # get/set individual color values >>> print pix.getRed() 168 >>> pix.setRed(255) 255 >>> color=pix.getColor() >>> print color color r=255 g=131 b=105 >>> pix.setColor(color)

12 LAB_1024 Pick any picture Draw a horizontal line of 10 pixels from (20,50) in the picture


Download ppt "Download JES Tool JES: Jython Environment for Students"

Similar presentations


Ads by Google