[TriLUG] Using Java to read image properties

Jeffery Painter painter at kiasoft.com
Mon Oct 6 13:38:52 EDT 2003


If you need X type stuff with a server that has no X installed, Sun has 
provided a nice solution to this 

	% java -Djava.awt.headless=true CLASSNAME

This will allow you to access all the graphical libs on a machine that 
does not actually have graphics capabilities.

HTH,
Jeff Painter

On Mon, 6 Oct 2003, Ubqtous wrote:

> Scott,
> 
> On 10/6/2003 at 12:55, you wrote:
> 
> SL> Exactly which libraries are you trying to use that the other forum
> SL> told you that you needed X ? Your suspicion is correct there's no
> SL> reason for X to be installed on a production box.
> 
> SL> You didn't mention what JRE would be on the production box, but
> SL> there is this API:
> SL> http://java.sun.com/j2se/1.4.1/docs/guide/imageio/
> 
> It's a RedHat 9 / Cold Fusion MX 6.1 server with Java 1.4.2., so:
> http://java.sun.com/j2se/1.4.2/docs/api/javax/imageio/package-tree.html
> 
> It appears as though the code I'm testing attempts to use imageio:
> 
> calling template code:
> objImageInfo=createObject("component","tmt_java_img");
> stImageInfo=objImageInfo.getDimensions("MJK.gif");
> writeoutput(stImageInfo.width&" x "&stImageInfo.height);
> 
> relevant line in 'tmt_java_img' component:
> jBufferedImg=createObject("java","javax.imageio.ImageIO").read(jFile)
> 
> Being a newbie, I'm not sure what the best way is to install the
> necessary package (I'm familiar with rpm and apt). Any pointers would
> be appreciated.
> 
> Thanks for the help!
> 
> ~ Ubqtous ~
> 
> 




More information about the TriLUG mailing list