|
mewsang
|
 |
« on: July 29, 2002, 10:38:00 PM » |
|
I have one project need manipulate pictures like resize or drawing by using java programming. I need X windows and java AWT package. I would like to ask LUNARPAGES may install X Windows in Linux. Below is the java packages that I used in Servlet:-
import javax.servlet.*; import javax.servlet.http.*; import java.awt.image.*; import java.io.*; import com.sun.image.codec.jpeg.*; import java.awt.*;
Feel free to discuess here
|
|
|
|
|
Logged
|
|
|
|
|
Kelvin
|
 |
« Reply #1 on: July 30, 2002, 12:05:00 AM » |
|
Hi
I understand what your problem is, I'm afraid I can't offer much advice as I don't know how the java AWT api wraps the X Windows API - but I'm sure there is an alternative method as Java has a massive web-specific multimedia API. Maybe you might consider using a 3rd party extension.
Anybody got some idea? [ July 30, 2002, 08:07 AM: Message edited by: EXiL3 ]
|
|
|
|
|
Logged
|
Kelvin
"Failure is not an option. It comes bundled with the software."
|
|
|
|
mewsang
|
 |
« Reply #2 on: July 30, 2002, 09:29:00 PM » |
|
I found an alternative way to draw pictures. The web site is http://www.eteks.com/pja/en/But, I am not yet test it. According to the PJA package, it may run in non X windows Linux. Anybody can try and share your experience to us.
|
|
|
|
|
Logged
|
|
|
|
|
Kelvin
|
 |
« Reply #3 on: July 30, 2002, 10:36:00 PM » |
|
I've never tried using server-side image processing. But what I can't understand is why are you using a "visual" based components such as AWT. surely there are image processing routines that are specific for server-side.
|
|
|
|
|
Logged
|
Kelvin
"Failure is not an option. It comes bundled with the software."
|
|
|
|
mewsang
|
 |
« Reply #4 on: July 31, 2002, 08:35:00 AM » |
|
I am trying use server side images processing because I have an application with JSP. Let said, I upload an original pictures to server, the server side will resize(make thumbnail) the pictures. It is better to me because I no need upload a lot of pictures to server, but just one original pictures. And also, my connecion in my house very slow and expensive. Thus, I have such idea in my mind.
|
|
|
|
|
Logged
|
|
|
|
|
stephan
Guest
|
 |
« Reply #5 on: July 31, 2002, 10:15:00 PM » |
|
Have you thought about using PHP? It might be simpler http://www.php.net
|
|
|
|
|
Logged
|
|
|
|
|
jblashil
|
 |
« Reply #6 on: August 01, 2002, 02:29:00 AM » |
|
What is it about PHP that makes you think it would be simpler? Are there some image processing tools available or something?
|
|
|
|
|
Logged
|
|
|
|
|
mewsang
|
 |
« Reply #7 on: August 01, 2002, 08:29:00 AM » |
|
i am not familiar with PHP. Thus, I didn't consider PHP. Any free php code that teach how to do images processing. Hope that anybody can share php tutorial.
|
|
|
|
|
Logged
|
|
|
|
|
lethalweapon
|
 |
« Reply #8 on: August 01, 2002, 11:56:00 AM » |
|
ok, don't quite understand what you need, is it you need to be able to shrink pics and add like text or pictures to them? Or do you just want a page with automatically resized thumbnails? If you could answer some of these questions, I could probably get back to you with some php code. It doesn't sound too difficult, whatever it is you want. You just want to temporarily add to the picture for the user that is currently viewing it, right? Like maybe add a welcome message to it or pictures? [ August 01, 2002, 07:59 PM: Message edited by: lethalweapon ]
|
|
|
|
|
Logged
|
|
|
|
|
mewsang
|
 |
« Reply #9 on: August 01, 2002, 06:28:00 PM » |
|
I plan to resize the pictures to thumbnail pictures. But i am not confident PHP can do as well as Java.
|
|
|
|
|
Logged
|
|
|
|
|
stephan
Guest
|
 |
« Reply #10 on: August 01, 2002, 07:10:00 PM » |
|
PHP is very flexible, I'm not sure if Java is better or not. You mentioned resizing pictures, this is definately possible in PHP. If you go to www.hotscripts.comThen click on the PHP section Then on Scripts and Programs Then on Image Manipulation you should find something to suit you (I hope). If not, lethalweapon will be able to help you. PHP is a very powerful language and (in my opinion), not as confusing as Java! [ August 02, 2002, 03:11 AM: Message edited by: Stephan ]
|
|
|
|
|
Logged
|
|
|
|
|
lethalweapon
|
 |
« Reply #11 on: August 02, 2002, 01:30:00 AM » |
|
Ok, since i can't seem to post code here, the code is at the following page: http://lethal.lunarpages.com/resize/resizecode.txt If you have any questions feel free to ask. You can test my code out at: http://lethal.lunarpages.com/resize/resize.html Good luck! By the way, for the sample one on my website, you can try pacino.jpg and shrink it to like 200 or less. This prog shrinks it while keeping it with the same ratio, so what you are entering is the maximum height and width, the actual size will vary, but it will be less than the size you enter. [ August 02, 2002, 09:33 AM: Message edited by: lethalweapon ]
|
|
|
|
|
Logged
|
|
|
|
|
lethalweapon
|
 |
« Reply #12 on: August 02, 2002, 06:13:00 AM » |
|
Oh another thing, forgot to mention...This will only resize jpeg's, changing png's and gif's is just like changing a few lines, so if you needed one of those instead, I can modify it.
|
|
|
|
|
Logged
|
|
|
|
|
mewsang
|
 |
« Reply #13 on: August 04, 2002, 08:15:00 AM » |
|
Thanks a lot.
|
|
|
|
|
Logged
|
|
|
|
|