Java2d and rack

Before I dive too deeply into this myself (having never done java2d
before), just
thought I’d ask if anyone had any experience in using java2d from jruby?

Ideally I’m after a rack middleware that can transform images as they
pass through it.

In a somewhat related note, is there any way to use a chain of Rack
apps with servlet
filters, or does the Rack chain all run behind the ‘jruby servlet’ (as
you can probably tell,
I haven’t looked into how Warbler works in any detail :slight_smile: ).


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

Oddly enough, just tested that last night under jruby-rack and Restlet.

jruby-rack runs, among other choices, as a Filter and so you can run
it as part of a Filter chain. Warbler may not instantly set things up
the way you want, but you can probably convince it.

Java2d is possible to use in Ruby, but I felt, not natural. My
preference here was to write a simpler app specific API on the Java
side (resize,rotate etc)and use that from Ruby. We sometimes need to
use JAI or a C library for performance, quality, etc., and the simpler
API insulates Ruby developers from these details.

  • R

On Oct 12, 2009, at 4:38 AM, Dick D. [email protected] wrote:

filters, or does the Rack chain all run behind the ‘jruby servlet’ (as
you can probably tell,
I haven’t looked into how Warbler works in any detail :slight_smile: ).


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

On Mon, Oct 12, 2009 at 1:29 PM, Rob H.
[email protected] wrote:

Oddly enough, just tested that last night under jruby-rack and Restlet.

jruby-rack runs, among other choices, as a Filter and so you can run it as
part of a Filter chain. Warbler may not instantly set things up the way you
want, but you can probably convince it.

Cool, I’ll try it under GFv3 later tonight.

Java2d is possible to use in Ruby, but I felt, not natural. My preference
here was to write a simpler app specific API on the Java side (resize,rotate
etc)and use that from Ruby. We sometimes need to use JAI or a C library for
performance, quality, etc., and the simpler API insulates Ruby developers
from these details.

Fully agree :0 I ended up using ImageVoodoo, which is great for
resizing/thumbnailing.

Looks like I’ll still need to break out java2d for anything fancier,
but I needed an
excuse to dive into the java <-> jruby bits of JRuby anyway :slight_smile:

pass through it.
http://xircles.codehaus.org/manage_email


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

On Mon, Oct 12, 2009 at 5:52 PM, Thomas E Enebo [email protected]
wrote:

On Mon, Oct 12, 2009 at 10:22 AM, Dick D.
[email protected] wrote:

I ended up using ImageVoodoo, which is great for
resizing/thumbnailing.

Looks like I’ll still need to break out java2d for anything fancier,
but I needed an
excuse to dive into the java <-> jruby bits of JRuby anyway :slight_smile:

If you figure out any useful abstractions which can be folded back
into ImageVoodoo, then holler. ImageVoodoo is first and foremost a
library to give compatibility with image science, but that doesn’t
mean we can’t add additional value-add features.

Hi Tom,

I was working under the assumption that ImageVoodoo just supported
the features that ImageScience did, but just before I started reading up
on
AffineTransforms I thought I’d check.
Turns out you do what I need already :slight_smile:

(I’m looking at a silly Rack filter to invert jpegs, a bit like:
http://www.ex-parrot.com/pete/upside-down-ternet.html
)

You’ve done a great job with ImageVoodoo, it’s exactly what JRuby should
be
about. All the power of Java wrapped in a the simplicity of a Ruby
lib. Thanks a lot!


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

On Mon, Oct 12, 2009 at 10:22 AM, Dick D.
[email protected] wrote:

Java2d is possible to use in Ruby, but I felt, not natural. My preference
excuse to dive into the java <-> jruby bits of JRuby anyway :slight_smile:
If you figure out any useful abstractions which can be folded back
into ImageVoodoo, then holler. ImageVoodoo is first and foremost a
library to give compatibility with image science, but that doesn’t
mean we can’t add additional value-add features.

-Tom

To unsubscribe from this list, please visit:


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email


blog: http://blog.enebo.com twitter: tom_enebo
mail: [email protected]


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs