Created
June 21, 2018 17:19
-
-
Save nocarryr/a4a72c6577d79633ecf11c2186e164f7 to your computer and use it in GitHub Desktop.
Processing test for image scaling
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PImage srcImg; | |
PImage dstImg; | |
Float scaleW; | |
Float scaleH; | |
void setup() | |
{ | |
size(1280, 720); | |
srcImg = loadImage("/mnt/resource/Shared Projects/modeling/testpatterns/1920x1080.png"); | |
scaleW = float(width) / float(srcImg.width); | |
scaleH = float(height) / float(srcImg.height); | |
} | |
void draw(){ | |
background(255); | |
image(srcImg, 0, 0, width, height); | |
//scale(scaleW, scaleH); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment