Questions tagged [jes]

The (JES)Jython Environment for Students is a full-featured media computation environment for programming in Jython. It includes facilities for programming, debugging, and media examination. JES also comes with an extensive multimedia API, enabling easy and rapid manipulations of sounds, images, and on some platforms, video.

177 questions
1
vote
0 answers

Splitting an image into 4 pieces using python JES

How do I split an image in JES? I am a new IT student and i just need a guide how to go about it, I have tried def splitImage(filename): and I loaded the program but its coming up with an invalid syntax. I am not sure what am doing wrong
Edog
  • 11
  • 1
1
vote
1 answer

Pixel movement and loops Python

We are using JES in my intro programming class and I have run into roadblock for my lab. The program is supposed to allow a user to select a picture and then a moth(bug) will start at the center of the picture and make random movements and change…
Garrett
  • 13
  • 2
1
vote
1 answer

How do you add a swirl to an image (image distortion)?

I was trying to figure out how to make a swirl in the photo, tried looking everywhere for what exactly you do to the pixels. I was talking with a friend and we kinda talked about using sine functions for the redirection of pixels?
beeroverflow
  • 35
  • 1
  • 8
1
vote
1 answer

How to make empty canvas in JES/Python

Create an empty picture with dimensions 350x350 I came up with this: def makeNewCanvas(): canvas = makeEmptyPicture(350, 350) it does nothing please help
James Angele
  • 13
  • 2
  • 4
1
vote
1 answer

Cropping an image in JES (Python)

So I'm really new to this Python thing and I'm using JES and trying to figure out how to crop an image. I keep getting an error that "show (croppedPicture)" is invalid and I could use any help I can get at this point. This is my code so far: def…
1
vote
0 answers

Using printNow to show multiple variables on a single line

So I've been able to get printNow to show a single variable in a line but I need to display two in a single line, using the printNow feature (which I need to use over just the standard print feature). I can only get it to display one. I did a search…
Countach
  • 597
  • 1
  • 10
  • 20
1
vote
1 answer

Jes: My bar chart is upside down (beginner)

My current code is def drawBarChart(b1, b2, b3): x = 300 y = 320 if b1 > y: y = b1 + 100 if b2 > y: y = b2 + 100 if b3 > y: y = b3 + 100 pic1 = makeEmptyPicture(x, y) bar(pic1, 60, b1, 40, red) bar(pic1, 140, b2, 40,…
Austin
  • 29
  • 3
1
vote
2 answers

combining two images, multiplying RGB values to vignette an image Jython/Python

https://i.stack.imgur.com/AAtUD.jpg https://i.stack.imgur.com/eouLY.jpg images to use for code. the end result i am trying to do is combine the vignette picture and the CGI picture because the vignette images RGB values are darker towards the…
Master_Cdawgg
  • 15
  • 1
  • 6
1
vote
1 answer

Jython JES: Changing brightness of image won't work

can anyone help me out here? I'm new to Jython/Python (coding in general) and I'm currently using the library that is included into this program called JES which allows me to alter images easily etc. So I'm try to alter this images brightness by…
james
  • 55
  • 1
  • 1
  • 6
1
vote
1 answer

Drawing opposite lines in JES (Python)

So I have a random point on a canvas that will draw a line to a random point along a line across the bottom of the canvas. From that random point along the bottom of the canvas, I want to draw a line that diverges in the opposite direction (think of…
1
vote
1 answer

JES: Implementing modification code to a Loop

I am using JES and am wondering what built in function I should use to make this effect work. newG=(oldG+(abs(x*y*2.57901)%64))%256 So far I have this code def forLoop(): picture = makeEmptyPicture(300,200) show(picture) for p in…
user3428382
1
vote
1 answer

Jython (JES) - 90 degree rotation function

I need to write a function spin(pic,x) where it will take a picture and rotate it 90 degrees counter clockwise X amount of times. I have just the 90 degree clockwise rotation in a function: def rotate(pic): width = getWidth(pic) height =…
user2917962
  • 11
  • 1
  • 3
1
vote
2 answers

Scaling Part of a Picture

I want to scale up a part of a picture, in this example, a nose. I have a function to select the part of the picture I want to enlarge. def copyAndPaste(picture): height = getHeight(picture) width = getWidth(picture) newPicture =…
user3956566
1
vote
1 answer

Saving a movie generated with Jython/JES on local disk

I made an autogenerated movie clip using JES (Jython Environment for Students). I can play it without any problem using playMovie(), but I can't figure out how to have it saved physically on disk. The full script is located here. ... movie =…
Gauthier Boaglio
  • 10,054
  • 5
  • 48
  • 85
1
vote
1 answer

Can makeQuicktimeMovie be used for png file?

I am using JES, and have my png files ready to makeQuicktimeMovie. I can't find anywhere, can I use png files? The JES function as follows: def makeQuicktimeMovie(): file = pickAFile() myMovie = makeMovieFromInitialFile(file) …
user3956566