Loading PImage on mobile question

edited November 2014 in p5.js

Hello everyone.

First, I am not sure if I should make this question here, if not, I am sorry for the inconvenience.

I download some apps for iphone to code processing via processing.js within iPhone. And one of the tutorial includes a conversation about PImage, but I am not sure the tutorial is regarding the environment in iPhone, where I can't create a folder called Data to place my images.

I tried to use pictures from the internet with loadImage(url), and I am pretty sure it once worked, but not anymore.

I would ask if I am missing something.

String imgPath = "http://www.clipartbest.com/cliparts/MiL/x45/MiLx45Aia.png";  //testing picture from internet
//String imgPath = "MiLx45Aia.png";  //(from Data folder when running in pc);

void setup(){
  noLoop();
  size(300,300);
  //size(screen.width,screen.height);
  background(200);
  PImage img = loadImage(imgPath);
  img.resize(0,100);
  image(img, 0,50);
}

Best,

Bontempos~

Answers

Sign In or Register to comment.