Alexandre B A Villares 2020-11-10 21:06:16 -03:00
rodzic 3aabb09fa3
commit beb2d0e795
4 zmienionych plików z 31 dodań i 1 usunięć

Plik binarny nie jest wyświetlany.

Po

Szerokość:  |  Wysokość:  |  Rozmiar: 117 KiB

Plik binarny nie jest wyświetlany.

Po

Szerokość:  |  Wysokość:  |  Rozmiar: 1.9 MiB

Wyświetl plik

@ -0,0 +1,24 @@
def setup():
size(640, 360)
# The image file must be in the data folder of
# the current sketch to load successfully.
global img
img = loadImage("moonwalk.jpg") # Load the image into the programr
def draw():
background(255, 0, 0)
image(img, 0, 0)
def reduce_image(img, factor):
rimg = createGraphics(int(img.width * factor), int(img.height * factor))
rimg.beginDraw()
rimg.image(img, 0, 0, img.width * factor, img.height * factor)
rimg.endDraw()
return rimg
def keyPressed():
global img
if key == 'r':
img = reduce_image(img, .9)

Wyświetl plik

@ -26,6 +26,12 @@ Here are listed some of the tools I have been using:
---
![sketch_2020_11_10reduce_images](2020/sketch_2020_11_10reduce_images/sketch_2020_11_10reduce_images.gif)
[sketch_2020_11_10reduce_images](https://github.com/villares/sketch-a-day/tree/master/2020/sketch_2020_11_10reduce_images) [[Py.Processing](https://villares.github.io/como-instalar-o-processing-modo-python/index-EN)]
---
![sketch_2020_11_09arcs_for_pyp5js](2020/sketch_2020_11_09arcs_for_pyp5js/sketch_2020_11_09arcs_for_pyp5js.jpg)
[sketch_2020_11_09arcs_for_pyp5js](https://github.com/villares/sketch-a-day/tree/master/2020/sketch_2020_11_09arcs_for_pyp5js) [[Py.Processing](https://villares.github.io/como-instalar-o-processing-modo-python/index-EN)]
@ -38,7 +44,7 @@ Here are listed some of the tools I have been using:
---
![sketch_2020_11_07](2020/sketch_2020_11_07/sketch_2020_11_07.gif)
![sketch_2020_11_07a](2020/sketch_2020_11_07a/sketch_2020_11_07a.gif)
[sketch_2020_11_07](https://github.com/villares/sketch-a-day/tree/master/2020/sketch_2020_11_07) [[Py.Processing](https://villares.github.io/como-instalar-o-processing-modo-python/index-EN)]