Return-Path: Delivered-To: apmail-jakarta-ant-dev-archive@apache.org Received: (qmail 58128 invoked from network); 24 May 2002 15:52:51 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 24 May 2002 15:52:51 -0000 Received: (qmail 7666 invoked by uid 97); 24 May 2002 15:52:51 -0000 Delivered-To: qmlist-jakarta-archive-ant-dev@jakarta.apache.org Received: (qmail 7639 invoked by uid 97); 24 May 2002 15:52:50 -0000 Mailing-List: contact ant-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Ant Developers List" Reply-To: "Ant Developers List" Delivered-To: mailing list ant-dev@jakarta.apache.org Received: (qmail 7617 invoked by uid 98); 24 May 2002 15:52:49 -0000 X-Antivirus: nagoya (v4198 created Apr 24 2002) Message-ID: <3CEE61CD.3060505@ntplx.net> Date: Fri, 24 May 2002 11:52:45 -0400 From: Kevin Z Grey User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0rc2) Gecko/20020510 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Ant Developers List Subject: Re: ImageManip References: <3CEDB218.2080503@ntplx.net> <00aa01c202f7$c181c480$52a0f40f@nordwand> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Steve Loughran wrote: >----- Original Message ----- >From: "Kevin Z Grey" >To: "Ant Developers List" >Sent: Thursday, May 23, 2002 8:23 PM >Subject: Re: ImageManip > > > > >>Heya, >> >> I actually considered that same thing when I was looking into this. >> What I concluded is the following: >> >> - SVG is targeted at building images from the bottom up (simple >>shapes, text, etc) for the purpose of simple, yet pretty pictures and >>user interfaces (even animations!) >> >> > >well, look on it as HTML crossed with postscrupt > > > >> - SVG is targeted at wireless (and related) devices where the >>bandwidth is limited >> >> > >That's one use, though the use I made of in a project last year involved >server side rendering of photos and fonts at 1200dpi. Look at the 'when web >services go bad' paper under http://iseran.com/ > > > >> - SVG does not include handling of files (read/write/formats/etc) >> >> > >handles reading just like html: > > > Ok, but it still doesn't handle writing and conversion to different formats. SVG should really be called Scalable Vector Graphics Display. It also does not contain any kind of functionality targeting automation. (more below) > > >> - SVG does not include manipulation of existing image files, for >>example, you cannot take a JPEG of a monkey and draw a circle on his >>face... you can however create an image of a monkey using vectors, but >>it'd be really really hard to make it look remotely realistic. >> >> > >see above. take the jpeg. overlay the vectors, use alpha blending > > > >> - My project is targeting manipulation of existing images, and >>while SVG does have a good framework for their purposes, their model is >>pretty obfuscated (in that its overly complex) >> >> > >I agree on the complex, think you missed some of the obvious bits of the >spec in your rush to re-implement. > > > >> - SVG doesn't seem to support the chaining model, but rather >>only allows you to draw to a single palette. >> >> > >unsure about what that means, or how SVG relates. > > JAI allows the developer to chain multiple image operations together. For example: load an image into memory, rotate it by 45 degrees, scale to 25%, store it to disk PlanarImage image = JAI.create("fileload", "me.jpg"); float t_angle = (float) (45 * (Math.PI / 180.0F)); ParameterBlock pb = new ParameterBlock(); pb.addSource(op); pb.add(0.0F); pb.add(0.0F); pb.add(t_angle); pb.add(new InterpolationNearest()); image = JAI.create("Rotate", pb, null); pb.add(new Float(0.25)); pb.add(new Float(0.25)); image = JAI.create("scale", pb); Now lets say you want to draw a rectangle with text in it, then roate that rectangle and insert into a specific location. This can be represented very elloquently in XML as a tree, and can be applied to multiple images: (more below) > > >> Further more, my envisioning allows the user to build complexity in >>a hierarchical form; even extend by overloading one function, and it all >> >> >>seems to fit nicely with the ANT framework. See where I'm coming from >>with this? :) >> >> > >sort of > Lets say you're working for a company with multiple products that all share the same template image for their company logo. The marketing dept comes to you and insists that you do the following for each splash screen: Take the template company logo image and insert a different product logo per product to the precise location (precise down to the pixel, and yes there are people who are this picky....). Then take the resulting image and draw the product name, version, build # and date, and rotate that slighty by 5 degrees. Are there any existing utils that allow you to do this without either writing a shell script or coding your own executable specific for the task? I haven't been able to find one.... and I think it'd be incredibly useful. Especially if a wide assortment of ANT users develop servlet based apps. You can also throw some more twists to the story, like add a certain border, or background, alpha layer, etc to make the task more difficult. Is there an existing automated solution to this? ~~K -- To unsubscribe, e-mail: For additional commands, e-mail: