• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Loading an Image on a headless (No XWindows) server

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi ...
I'm developing an web application where the user should be able to upload jpg-images. These images should be saved to disk, and there should be generated a thumbnail and a "low-quality" version of the image.
I've created an ImageConverter class to do this, and it works great on my Windows 2000 computer. But when we tried to install this on a Linux server without X-Windows (and they won't install it for me), it won't work. I've rewritten most of the code so that it should work on this "headless" environment, but I'm not able to figure out how to "load" an image in this environemt. I'm using this approach today:

//Create image and load its data
Image img = Toolkit.getDefaultToolkit().getImage(tmp.getPath());
MediaTracker tracker = new MediaTracker (new Container ());
tracker.addImage (img, 0);
try {
tracker.waitForID (0);
} catch (InterruptedException e) {}
but this wont work in an headless enviroment. Does anyone know of another way to "load" an image. I'm not able to use JDK 1.4, and I'm not able to use another AWT implementation (PJA).
Any help appreciated
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic