Web Hosting Forum | Lunarpages


*
Welcome, Guest. Please login or register.
Did you miss your activation email?



Login with username, password and session length
May 23, 2012, 10:47:43 PM

Pages: [1]   Go Down
  Print  
Author Topic: X Windows + Java  (Read 2727 times)
mewsang
Trekkie
**
Offline Offline

Posts: 10


WWW
« 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
Jabba the Hutt
*****
Offline Offline

Posts: 737



« 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
Trekkie
**
Offline Offline

Posts: 10


WWW
« 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
Jabba the Hutt
*****
Offline Offline

Posts: 737



« 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
Trekkie
**
Offline Offline

Posts: 10


WWW
« 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
Pong! (the videogame) Master
*****
Offline Offline

Posts: 23


WWW
« 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
Trekkie
**
Offline Offline

Posts: 10


WWW
« 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
Galactic Royalty
*****
Offline Offline

Posts: 242


WWW
« 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
Trekkie
**
Offline Offline

Posts: 10


WWW
« 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.com
Then 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!    "[Cool]"
 
 [ August 02, 2002, 03:11 AM: Message edited by: Stephan ]
Logged
lethalweapon
Galactic Royalty
*****
Offline Offline

Posts: 242


WWW
« 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
Galactic Royalty
*****
Offline Offline

Posts: 242


WWW
« 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
Trekkie
**
Offline Offline

Posts: 10


WWW
« Reply #13 on: August 04, 2002, 08:15:00 AM »

Thanks a lot.
Logged
Pages: [1]   Go Up
  Print  
 
Jump to: