 |
Author |
Topic: interacting with Perl CGI (Read 1792 times) |
|
kirkjerk

|
interacting with Perl CGI
« on: Mar 18th, 2005, 12:28am » |
|
So I created a little text-as-image-mask applet, http://kisrael.com/viewblog.cgi?date=2005.03.17 -- hope you don't mind the mild political message there. Anyway, I'd like to generalize this into a "useful", online app, which might include letting people upload their own images, enter the the text, and see the results. All of that I can handle either my making the applet itself less interactive (i.e. enter the text in a HTML form, then submit to see it, and passing the text as a param) or by trickery with link() (submitting the text as a hacked together URL on the server) But the image thing bugs me....is there anyway to load an image except from a jar? I could envision a cgi script that builds replaces a file inside a jar, but that seems disk-space and performance ugly and/or with concurrency issues. Also, though this is off topic for this forum, is there a way of cloning a BImage? I'm manipulating the pixels[] in a lossy way, so every loop I'm doing an loadImage to get a clean slate. I'd prefer to load it once as a master copy and then make clones of that (hmmm...I don't know about the efficiency of a manual pixels[] copy vs a loadImage call...)
|
|
|
|
fry
|
Re: interacting with Perl CGI
« Reply #1 on: Mar 18th, 2005, 6:27pm » |
|
have you actually tried it? it should work just fine to have an image outside a jar. the jar file exists only as a convenience (to avoid having several file boogers for each sketch). an image in the same folder as the jar should probably load, and if not, another way is to unpack the jar into a folder (unpack mysketch.jar into a folder called mysketch) and then change your the ARCHIVE=mysketch.jar to CODEBASE=mysketch and then you can change the images in there to your heart's content.
|
|
|
|
kirkjerk

|
Re: interacting with Perl CGI
« Reply #2 on: Mar 21st, 2005, 11:36pm » |
|
Aha...I should've experimented first! You're right, having the image file as the same directory as the jar works pretty well...haven't experimented to see if having the index.html and the jar in different directories messes with things, but even if not I could work with what I have here. Thanks!
|
|
|
|
|