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_
   Topics & Contributions
   Tools
(Moderator: REAS)
   Discover .jar dimensions
« Previous topic | Next topic »

Pages: 1 
   Author  Topic: Discover .jar dimensions  (Read 1297 times)
megamu

megamu+loves+you WWW
Discover .jar dimensions
« on: Mar 1st, 2005, 11:32pm »

So I'm working on a new version of my portfolio website (http://v2.megamu.com/) and I want to be able to serve up work I've done in processing.
 
How the website works is I put a folder full of files on the server and each folder is turned into a 'project' and the subsequent pages are rendered from any information you can pull directly out of the files. Specifically the dimensions of a visual file. Images and Video I've already figured out how to retrieve dimensions from in order to generate the appropriate code, but I'm at a loss for how to do this with a .jar file.
 
So basically I want PHP to be able to detect the dimensions that the executible .jar file should be displayed at.
 
Does anyone have any clue how to go about this?
 
JohnG

WWW
Re: Discover .jar dimensions
« Reply #1 on: Mar 2nd, 2005, 11:07am »

A jar file is pretty much a .zip file with a different extension, so I think you could probably include another fiel in your jar files, with the dimensions in it, and PHP may be able to extract that one file, and read the contents.
 
To do this with processing, I think you can just put any file in the "data" directory of a sketch, and it'll get included in the .jar file.
 
megamu

megamu+loves+you WWW
Re: Discover .jar dimensions
« Reply #2 on: Mar 12th, 2005, 6:42pm »

That's a pretty good idea, but I wish there was a way to do so without having to do anything special to the .jar that way I could take any random old jars I have and just dump them in the system and have it 'work'
 
fjen

WWW
Re: Discover .jar dimensions
« Reply #3 on: Mar 12th, 2005, 11:45pm »

processing automatically put's height and width (*) into the applet tag in the html-file generated by export to web. move that next to your sketch.jar and read the size out of there ...
 
(*) if it's set with fixed values not vars ( size(100,100); not size(a,b); )
 
i don't think there is a fast and easy way to read the values out of the .class-files inside the .jar ...
 
/F
« Last Edit: Mar 12th, 2005, 11:46pm by fjen »  
Pages: 1 

« Previous topic | Next topic »