Download JES Tool JES: Jython Environment for Students

Slides:



Advertisements
Similar presentations
CS1315: Introduction to Media Computation Making sense of functions.
Advertisements

LAB SESSION 7 Graphical user interface Applet fundamentals Methods in applets Execution of an applet Graphics class.
Python: Modifying Pictures Using Loops. Review JES command area – program area Defining/using functions specifying a sequence of steps for what the function.
TOPIC 5 INTRODUCTION TO PICTURES 1 1 Notes adapted from Introduction to Computing and Programming with Java: A Multimedia Approach by M. Guzdial and B.
ManipulatingPictures-Mod6-part21 Manipulating Pictures, Arrays, and Loops part 2 Barb Ericson Georgia Institute of Technology.
CS1315: Introduction to Media Computation Introduction to Programming.
Created by Mark Guzdial, Georgia Institute of Technology; modified by Robert H. Sloan, University of Illinois at Chicago, For Educational Use. CS.
Python: Making colors and Using Loops. Review JES command area – program area Defining/using functions specifying a sequence of steps for what the function.
Chapter 2: Introduction to Programming. Chapter Learning Objectives.
CS 102 Computers In Context (Multimedia)‏ 02 / 06 / 2009 Instructor: Michael Eckmann.
CS 102 Computers In Context (Multimedia)‏ 02 / 18 / 2009 Instructor: Michael Eckmann.
James Tam Programming: Part II In this section of notes you will learn about more advanced programming concepts such as looping, functions.
CS 102 Computers In Context (Multimedia)‏ 02 / 25 / 2009 Instructor: Michael Eckmann.
Photo Editing Basics with Photoshop. Upload your pictures Connect the camera to an available USB port Connect the camera to an available USB port Turn.
Introduction to Computing and Programming in Python: A Multimedia Approach Chapter 3: Modifying Pictures using Loops.
Graphics in Python using the JES environment
+ Introduction to Programming My first red-eye removal.
CS 101: Introduction to Computing Programming picture manipulations Developed by Mark Guzdial, Georgia Institute of Technology, 2003–2004; modified by.
CS1315: Introduction to Media Computation Picture encoding and manipulation.
CS1315: Introduction to Media Computation Picture encoding and manipulation.
Download JES Tool JES: Jython Environment for Students
Lecture # 27 Python I. Python “Interpretive” language (vs. compiled) So is HTML, JavaScript. Python supports file I/O. JavaScript doesn’t Python is a.
Python programming Introduction to the JES environment and basics of Python Reading: Chapters 1, 2 from “Introduction to Computing and Programming in Python”
Jeopardy Heading1Heading2Heading3Heading4 Heading5 Q $100 Q $200 Q $300 Q $400 Q $500 Q $100 Q $200 Q $300 Q $400 Q $500 Final Jeopardy.
CS1315: Introduction to Media Computation Introduction to Programming.
CS 100 Introduction to Computing Introduction to JES Developed by Mark Guzdial, Georgia Institute of Technology, 2003–2004; modified by Robert H. Sloan.
Introduction to Computing and Programming in Python: A Multimedia Approach Chapter 3: Modifying Pictures using Loops.
CS1315: Introduction to Media Computation Picture encoding and manipulation.
Introduction to Computing and Programming in Python: A Multimedia Approach Chapter 3: Modifying Pictures using Loops.
01-IntroToMediaComp1 Barb Ericson Georgia Institute of Technology Feb 2010 Introduction to Computer Science and Media Computation.
CS 102 Computers In Context (Multimedia)‏ 02 / 09 / 2009 Instructor: Michael Eckmann.
Python Programming in Context Chapter 6. Objectives To understand pixel based image processing To use nested iteration To use and understand tuples To.
How to Install Eclipse Click hereClick here to download Eclipse.
1.5 LooGix.com Experience and Creation Meg Moring.
You may have already done this… Download the class files to the desktop Expand those files into root of USB stick Change your USB stick to drive “Z”!
Chapter 3: Modifying Pictures using Loops. Chapter Learning Objectives.
A Media Computation Cookbook Manipulating Images and Sounds for Use in Alice Part 1: Image Manipulations Part 2: Advanced Image Manipulations, e.g., changing.
CS1315: Introduction to Media Computation Introduction to JES.
1 SIC / CoC / Georgia Tech MAGIC Lab Rossignac Processing  Install Processing  Learn how to edit, run, save, export,
CS1315: Introduction to Media Computation Introduction to Programming.
Python: Working with pixels. Reminder: Conditionals if age < 18: showInformation(“Sorry, not allowed to vote yet.”) else: showInformation(“Please select.
Creating a Zip File with a Password. 1.Right Click on the File or Folder you want to Zip. 2.Choose “Add to Zip”
I MAGE P ROCESSING IN CS1 Brad Miller David Ranum Luther College.
Python programming Using the JES picture functions and defining new functions.
XP New Perspectives on Creating Web Pages With Word Tutorial 1 1 Creating Web Pages With Word Tutorial 1.
CS1315: Introduction to Media Computation Introduction to JES.
Test 2 on Wed, 11/9 On image processing
Multimedia Summer Camp
Python/JES JES IDE (Integrated Development Environment)
Chapter 4: Modifying Pictures using Loops
Download JES Tool JES: Jython Environment for Students
Appendix A Barb Ericson Georgia Institute of Technology May 2006
A Short DOS Presentation
Week 2.
CS1315: Introduction to Media Computation
Picture Functions ppp =makePicture(pickAFile())
Chapter 2: Introduction to Programming
Chapter 2: Introduction to Programming
Test 2 on Wed, 11/9 On image processing
Chapter 4: Modifying Pictures using Loops
Chapter 3: Modifying Pictures using Loops
Embedding Graphics in Web Pages
Chapter 3: Modifying Pictures using Loops
Agenda – 1/31/18 Questions? Group practice problems
Other displays Saving Arrays Using fors to process
Python Practice !!!.
CS 177 Week 3 Recitation Slides
Chapter 3: Modifying Pictures using Loops
CS1315: Introduction to Media Computation
Let's create your English Folder!.
Presentation transcript:

Download JES Tool JES: Jython Environment for Students Python development tool developed by Georgia Tech Download and install JES at C:/100 From https://github.com/gatech-csl/jes/releases, Select jes-5.010-windows-java-included.zip And select “Save As” to download to C:/100

Download JES Tool Right-click on the zip file, select 7-zip, and select ‘Extract Here.’

Download media files Under C:\100, you should have C:\100\JES.exe Create a new folder pics under C:\100 Download www.cs.uml.edu/~kim/100/pics.zip Save into C:\100\pics Right click and select 7-zip &‘Extract here.” Under C:\100, you should have C:\100\JES.exe C:\100\pics (folder)

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

Picture Functions in JES pickAFile() opens a file browser to select a file makePicture(filename) creates and returns a picture object, from the JPEG file at the filename show(pic) displays a picture in a window repaint(picture) to re-display after changing it FileImage() pic.draw()

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())

Other Pixel Functions getPixel(pic,x,y) to get a single pixel ----- pic.getPixelt(x,y) getRed, getGreen, and getBlue are functions that return a color value (between 0 and 255) at a specified pixel setRed, setGreen, and setBlue are functions that set its color value at a specified pixel We can also get, set, and make colors getColor returns a Color object with three color values at a pixel setColor sets the pixel to the specified color makeColor returns a Color object with specified three color values pickAColor lets you use a color chooser and returns the chosen color

Example >>> thisPixel = getPixel(myPic,1,1) >>> print thisPixel Pixel, color=color r=168 g=131 b=105 # get/set individual color values >>> print getRed(thisPixel) 168 >>> setRed(thisPixel,255) 255 >>> color=getColor(thisPixel) >>> print color color r=255 g=131 b=105 >>> setColor(thisPixel,color)

Example >>> newColor=makeColor(0,100,0) >>> print newColor color r=0 g=100 b=0 >>> setColor(thisPixel,newColor) >>> print getColor(thisPixel) >>> print color color r=168 g=131 b=105 >>> print makeDarker(color) color r=117 g=91 b=73 >>> newcolor=pickAColor() >>> print newcolor color r=255 g=51 b=51

Change Colors Directly >>> file=pickAFile() >>> pict=makePicture(file) >>> show(pict) >>> setColor(getPixel(pict,10,100),black) >>> setColor(getPixel(pict,11,100),black) >>> setColor(getPixel(pict,12,100),black) >>> setColor(getPixel(pict,13,100),black) >>> repaint(pict)

LAB Draw a horizontal line of 100 pixel from (20,50) in a picture Write a Python function hLine(pic, len) to draw a horizontal line of length ‘len’ from (20,50) of a picture ‘pic.’ Write a Python function diag(pic, len, tx,ty) to draw a diagonal line of length ‘len’ starting at location (tx,ty)