FAQ
Cover
This is the archive Discourse for the Processing (ALPHA) software.
Please visit the new Processing forum for current information.

   Processing 1.0 _ALPHA_
   Bugs
   Software Bugs
(Moderator: fry)
   LoadImage using Microsoft's VM JView
« Previous topic | Next topic »

Pages: 1 
   Author  Topic: LoadImage using Microsoft's VM JView  (Read 379 times)
jedierikb

WWW
LoadImage using Microsoft's VM JView
« on: Feb 28th, 2004, 3:19am »

BImage          truck;
 
void setup() {
truck = loadImage("truck.gif");
}
 
void loop() {
image( truck, 20, 20 );
}
 
# # #
 
Using Microsoft's VM, I am unable to load BImages from jar files made by processing.  
 
I am calling Microsoft's VM from the command line (JView).
 
On a related note, I am able to load BFonts.
 
Thanks.
« Last Edit: Feb 28th, 2004, 3:39am by jedierikb »  
fry


WWW
Re: LoadImage using Microsoft's VM JView
« Reply #1 on: Feb 28th, 2004, 8:53pm »

hmm.. what does unable to load mean? that you get exceptions? that it doesn't do anything?
 
loading images is pretty basic functionality so i'd be surprised if it didn't work..
 
jedierikb

WWW
Re: LoadImage using Microsoft's VM JView
« Reply #2 on: Feb 28th, 2004, 11:11pm »

When run from a jar using Microsoft VM JView, after calling:
 
BImage truckImage = loadImage("truck.gif");
System.out.println( "dim: " + truckImage.width + ", " +  truckImage.height );
 
the BImage object's width and height are -1.  The gif is not displayed in the loop method either.
 
The same jar, made from P5 68, loads the image in successfully (has a non negative width and height and is displayed) using sun's 1.1.8 vm.
 
Thanks.
 
the calls:
C:/jdk1.1.8/bin/appletviewer index.html
and
jview /a /cp:p JViewTest.jar JViewTest
 
winxp with JView installed.
« Last Edit: Feb 28th, 2004, 11:16pm by jedierikb »  
fry


WWW
Re: LoadImage using Microsoft's VM JView
« Reply #3 on: Feb 29th, 2004, 7:18pm »

try putting the file on a web server, and use  
 
jview /a http://blahblah/index.html
 
you might be running into a security problem. in some cases, the msft vm won't give you access to things if it figures out that you're loading from a local file.  
 
(this is not to say that it's not a bug, it's just something to try before we mark it as such...)
 
jedierikb

WWW
Re: LoadImage using Microsoft's VM JView
« Reply #4 on: Feb 29th, 2004, 9:17pm »

that works.  i can see the image using JView now that the applet is up on the web.
 
in summary: BFonts load okay locally, but BImages do not when using the Microsoft VM JView.  
 
fix: put your applet onto the web, where the Microsoft VM will be able to load in everything.
« Last Edit: Feb 29th, 2004, 10:44pm by jedierikb »  
Pages: 1 

« Previous topic | Next topic »