Reflection – Molli

After showing off our project today, I am actually pretty proud of how it turned out. Our group worked really well together and we all agreed it was the smoothest group project for all of us this semester.

I am graduating this semester and thought it was super cool to be able to combine different ideas and concepts learned from other TAM classes. I loved being able to take our idea and turn it into a real life, working ‘thing’. We all are the creative types, and this project allowed us to think about art in a new way and work to problem solve.

With the help of our lovely TA’s we learned about how to incorporate data from the internet into our code and we dived deeper into images/arrays and how to alter them.

Solutions – Molli Nava

Thanks to office hours and Mckenzie, our RGB glitch has been solved and the API-altered image makes more sense.

After spending quite a bit of time brainstorming with Mckenzie, we figured out a much simpler way to execute the separation of the RGB channels of an image. We separated out the different color channels of an image, blended the pixels like the example in the book, and offset the different colors by changing their x and y values.

This is the new code:

#RGB SHIFT GLITCH

#Picture
picture = makePicture(pickAFile())
width = picture.getWidth()
height = picture.getHeight()
redImg = []
blueImg = []
greenImg = []

#Description: This code take an image and shifts the RGB channels in different directions.
# Leave Red in place
# Shift Blue up/left
# Shift Green down/right
for x in range(width):
  redImg.append([])
  blueImg.append([])
  greenImg.append([])
  for y in range(height):
    redImg[x].append([])
    blueImg[x].append([])
    greenImg[x].append([])
    
for x in range(width):
  for y in range(height):
    pixel = getPixel(picture, x, y)
    
    redImg[x][y] = getRed(pixel)
    greenImg[x][y] = getGreen(pixel)
    blueImg[x][y] = getBlue(pixel)

for x in range(width):
  for y in range(height):
    rPixel = redImg[x][y]
    bPixel = blueImg[x-50][y-50]
    gPixel = greenImg[x - 100][y - 100]
    
    newR = rPixel
    newG = gPixel
    newB = bPixel
    color = makeColor(newR, newG, newB)
    setColor(getPixel(picture, x, y), color)
    
    
explore(picture)

Examples of images I’ve glitched:

Mckenzie also explained how to go about altering an image using current temperature data. This is just the beginning of that, pulling in our specific data and value we want to use:

import urllib
import simplejson as json

#API WEATHER GLITCH
#Description: This is the starting point for creating our API weather-based glitch.
#It currently uses a yahoo url to grab the current temperature and prints out that value, which we can then use to alter our photographs.
url = "https://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20weather.forecast%20where%20woeid%20in%20(select%20woeid%20from%20geo.places(1)%20where%20text%3D%22boulder%2C%20co%22)&format=json&env=store%3A%2F%2Fdatatables.org%2Falltableswithkeys"
response = urllib.urlopen(url)
data = json.loads(response.read())
print data['query']['results']['channel']['item']['condition']['temp']

 

W14HW2 – Molli Nava

On Wednesday we grouped up and began figuring out what our workflow would look like and how we should start. I created a drive for us to upload our jes file to as well as any design elements we make and organized our group chat so we can all keep in contact while some of us go out of town this weekend.

We decided to start coding our first filter and refresh ourselves on all of the image information we learned at the beginning of the semester. And we gathered some online sources to help us with some of the glitches we aren’t sure how to execute.

We are definitely going to be challenged in understanding how to create each glitch, especially the one that utilizes API. But, we are starting with what we think we can do ourselves.