Crop operation never returns

View: New views
3 Messages — Rating Filter:   Alert me  

Crop operation never returns

by spamania :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi all,

I have JAI working OK for the most part, but I'm having a problem cropping images using JAI.create().  Here are the steps I'm taking:

1. Read image file from stream into a RenderedOp: RenderedOp image = JAI.create("stream", is);

2. Create the parameter block (hard-coded w/h values for testing):

ParameterBlockJAI params = new ParameterBlockJAI("crop");
params.addSource(image);

params.setParameter("x", image.getMinX());
params.setParameter("y", image.getMinY());
params.setParameter("width", 50);
params.setParameter("height", 50);

3. Create the crop operation: RenderedOp croppedImage = JAI.create("crop", params, null);

4. Save image

These steps work perfectly fine for scale operations, but the call to JAI.create(...) in step three never returns -- my application hangs and I need to abort it.

I am running on Mac OS X 10.5.2 Tiger.  I found one person complaining of a similar problem with ROI operations on Mac, but I haven't found any solutions or workarounds.

Any ideas?

Thanks a million.
nate

Re: Crop operation never returns

by spamania :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Just an update -- I verified that this is a Mac-specific issue by successfully running the crop code on my Windows XP machine at home (identical dev. env. with Eclipse, Maven, etc.).

Have any Mac users run up against JAI issues regarding the version that OS X ships with?  

Cheers,
nate

RE: Crop operation never returns

by pakmanlt :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Not that I can test this on a Mac but someone else may able help. Can
you provide a fully compliable source code with all the included
artifacts? Example: the code would create a rectangular image then do
all your operators.



-----Original Message-----
From: spamania [mailto:Onlogn@...]
Sent: Friday, March 14, 2008 3:34 PM
To: interest@...
Subject: [JAI] Crop operation never returns


Hi all,

I have JAI working OK for the most part, but I'm having a problem
cropping
images using JAI.create().  Here are the steps I'm taking:

1. Read image file from stream into a RenderedOp: RenderedOp image =
JAI.create("stream", is);

2. Create the parameter block (hard-coded w/h values for testing):

ParameterBlockJAI params = new ParameterBlockJAI("crop");
params.addSource(image);

params.setParameter("x", image.getMinX());
params.setParameter("y", image.getMinY());
params.setParameter("width", 50);
params.setParameter("height", 50);

3. Create the crop operation: RenderedOp croppedImage =
JAI.create("crop",
params, null);

4. Save image

These steps work perfectly fine for scale operations, but the call to
JAI.create(...) in step three never returns -- my application hangs and
I
need to abort it.

I am running on Mac OS X 10.5.2 Tiger.  I found one person complaining
of a
similar problem with ROI operations on Mac, but I haven't found any
solutions or workarounds.

Any ideas?

Thanks a million.
nate

--
View this message in context:
http://www.nabble.com/Crop-operation-never-returns-tp16055195p16055195.h
tml
Sent from the JAI Projects - Interest mailing list archive at
Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@...
For additional commands, e-mail: interest-help@...


______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@...
For additional commands, e-mail: interest-help@...