xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Julien Beghin <minimoi1...@hotmail.com>
Subject RE: SVG Colors inversion
Date Fri, 25 Jun 2010 13:09:37 GMT

Why not... 


I'am going to give this a try.

And going to try to fidn the matrix I've got to create ^^

Thanks for the hint

From: jonathanshawwood@gmail.com
Date: Fri, 25 Jun 2010 07:51:45 -0400
Subject: Re: SVG Colors inversion
To: batik-users@xmlgraphics.apache.org

It's hard to say if this would be more performant, but this might be a good use case for feColorMatrixElement

On Fri, Jun 25, 2010 at 6:18 AM, Julien Beghin <minimoi1234@hotmail.com> wrote:

Hello to all... (and happy summer ^^)


Im working on a project using Batik and dealing with SVG !


One part of this project consists in a kind of color inversion of some elements in the displayed

In fact, only black(resp white) have to be converted in  white(resp black).


The first solution is to look for each SVG elements in the displayed SVG. For each element
we can set the color to white/black.

This solution is really slow ( more than a minute...) and this can't be acceptable.

-> Document state is ALWAYS_DYNAMIC if can help


Another idea was to add an overlay, and inverting color of each pixel if required, but the
result is not convincing, probably because of antialising and rendering of the graphic, which
introduces gray level pixel. These pixel are not inverted by our overlay... and each refresh
takes aout 2seconds ( well.. depends on the screen resolution in fact ^^)


Do one of you have an idea on how to do this in optimisng performance(speed) and without grahics
losts ?


ANy help would be appreciated 

Votre vie privée l'est-elle vraiment ? Internet Explorer 8 vous protège gratuitement !
Installez gratuitement les nouvelles Emoch'ticones !
View raw message