You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by Peter Becker <pb...@meganesia.int.gu.edu.au> on 2001/06/05 04:45:06 UTC

PNG display problems in IE5.5

Hello,

I encountered some problems with Batik-generated PNGs in IE5.5: the
colors where completely wrong (e.g. an orange looked light yellow).
Netscape 4.x and my image viewer had no problems.

I tracked this down to line 63 in
org.apache.batik.transcoger.image.PNGImageTranscoder:

    params.setGamma(2.4f);

After I uncommented this line all works well -- so it is probably not a
bug but a feature in IE ;-)

What should the change of the gamma value gain? Does uncommenting this
break something?

Thanks,
    PeterB


---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org


Re: Handling Batik bugs

Posted by Vincent Hardy <vi...@sun.com>.
Peter,

We have not created any branch yet. May be we should create a CVS
log of all the bug fixes and document this in the weekly builds. 
There have been no weekly builds recently because of conferences and 
some other issues (personnal unavailabilities), but we will do our 
best to start again soon.

Vincent.

Peter Becker wrote:
> 
> Thomas E Deweese wrote:
> >
> > >>>>> "PB" == Peter Becker <pb...@meganesia.int.gu.edu.au> writes:
> >
> > PB> Thomas E Deweese wrote:
> > >> This bug should be fixed in the current CVS of Batik.
> >
> > >>>>> "PB" == Peter Becker <pb...@meganesia.int.gu.edu.au> writes:
> >
> > PB> Currently I distribute my two patches (this one and the white
> > PB> edges problem) as class files with my program -- is this ok or
> > PB> should I use the CVS version? Will there be an 1.1 or 1.0.1
> > PB> release in the next time?
> >
> >     Well, that decision is up to you.  I will point out that I believe
> > your publicly announced fix for the white edge problem, of subtracting
> > .5 instead of rounding is probably wrong, the one I committed does
> > nothing with .5 and just calls Math.round (originally the code added
> > .5 and then truncated to int, but this gives bad answers for negative
> > numbers, I then moved to Math.round, but missed to removing the .5
> > rounding factor).
> 
> This fix was just a quick hack -- worked for the few examples I tried
> but since I didn't really understand the code I didn't even try to get a
> real fix. I'll switch to Math.round, too.
> 
> The problem I have with switching to the CVS version is that CVS
> versions tend to get all the new errors ;-) Or do you have a bugfix
> branch? I couldn't find one.
> 
> [...]
> 
> > PB> Is there a list/place to stay up to date with Batik problems
> > PB> without too much work? Bugzilla is quite complex and noisy, an
> > PB> announcement list would be cool ;-)
> >
> >     Well, there is batik-dev which probably isn't much better, or
> > xml-batik-cvs which would allow you to see commit messages (not 100%
> > certain if that is the public name for it).  I'm not sure an
> > announcement list would cover this, since I don't think I would
> > necessarily post such a bug fix to an announcement list (which I
> > normally associate with 'big' announcements like version 1.0
> > released).
> 
> I guess a bugfix branch would be perfect for me -- cvs logs are a quite
> nice way of communicating since they give much context. I just would
> like to know about problems in my libraries before I try to fix them in
> my own code ;-)
> 
> Don't get me wrong: I think it is quite unavoidable that libraries have
> bugs and I understand that administrating bugs is not your favoured job
> ;-) But it is very inconvenient to try to fix a bug in your program for
> hours and then to realize that it is a well known (and maybe already
> fixed) problem in a library -- didn't happen with Batik yet, but it is
> not that uncommon.
> 
> [...]
> 
> Regards,
>   PeterB
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: batik-users-help@xml.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org


Handling Batik bugs

Posted by Peter Becker <pb...@meganesia.int.gu.edu.au>.
Thomas E Deweese wrote:
> 
> >>>>> "PB" == Peter Becker <pb...@meganesia.int.gu.edu.au> writes:
> 
> PB> Thomas E Deweese wrote:
> >> This bug should be fixed in the current CVS of Batik.
> 
> >>>>> "PB" == Peter Becker <pb...@meganesia.int.gu.edu.au> writes:
> 
> PB> Currently I distribute my two patches (this one and the white
> PB> edges problem) as class files with my program -- is this ok or
> PB> should I use the CVS version? Will there be an 1.1 or 1.0.1
> PB> release in the next time?
> 
>     Well, that decision is up to you.  I will point out that I believe
> your publicly announced fix for the white edge problem, of subtracting
> .5 instead of rounding is probably wrong, the one I committed does
> nothing with .5 and just calls Math.round (originally the code added
> .5 and then truncated to int, but this gives bad answers for negative
> numbers, I then moved to Math.round, but missed to removing the .5
> rounding factor).

This fix was just a quick hack -- worked for the few examples I tried
but since I didn't really understand the code I didn't even try to get a
real fix. I'll switch to Math.round, too.

The problem I have with switching to the CVS version is that CVS
versions tend to get all the new errors ;-) Or do you have a bugfix
branch? I couldn't find one.

[...]

> PB> Is there a list/place to stay up to date with Batik problems
> PB> without too much work? Bugzilla is quite complex and noisy, an
> PB> announcement list would be cool ;-)
> 
>     Well, there is batik-dev which probably isn't much better, or
> xml-batik-cvs which would allow you to see commit messages (not 100%
> certain if that is the public name for it).  I'm not sure an
> announcement list would cover this, since I don't think I would
> necessarily post such a bug fix to an announcement list (which I
> normally associate with 'big' announcements like version 1.0
> released).

I guess a bugfix branch would be perfect for me -- cvs logs are a quite
nice way of communicating since they give much context. I just would
like to know about problems in my libraries before I try to fix them in
my own code ;-)

Don't get me wrong: I think it is quite unavoidable that libraries have
bugs and I understand that administrating bugs is not your favoured job
;-) But it is very inconvenient to try to fix a bug in your program for
hours and then to realize that it is a well known (and maybe already
fixed) problem in a library -- didn't happen with Batik yet, but it is
not that uncommon.

[...]

Regards,
  PeterB

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org


Re: PNG display problems in IE5.5

Posted by Thomas E Deweese <th...@kodak.com>.
>>>>> "PB" == Peter Becker <pb...@meganesia.int.gu.edu.au> writes:

PB> Thomas E Deweese wrote:
>> This bug should be fixed in the current CVS of Batik.

>>>>> "PB" == Peter Becker <pb...@meganesia.int.gu.edu.au> writes:

PB> Currently I distribute my two patches (this one and the white
PB> edges problem) as class files with my program -- is this ok or
PB> should I use the CVS version? Will there be an 1.1 or 1.0.1
PB> release in the next time?

    Well, that decision is up to you.  I will point out that I believe
your publicly announced fix for the white edge problem, of subtracting
.5 instead of rounding is probably wrong, the one I committed does
nothing with .5 and just calls Math.round (originally the code added
.5 and then truncated to int, but this gives bad answers for negative
numbers, I then moved to Math.round, but missed to removing the .5
rounding factor).

    As to a 1.1 or 1.0.1 release this has been discussed however we
haven't set any planned dates for such a release.  My guess is that we
will have such a release, shortly before we start working on dynamic
support and/or modularization.  I wouldn't expect anything before the
end of the month.

PB> Is there a list/place to stay up to date with Batik problems
PB> without too much work? Bugzilla is quite complex and noisy, an
PB> announcement list would be cool ;-)

    Well, there is batik-dev which probably isn't much better, or
xml-batik-cvs which would allow you to see commit messages (not 100%
certain if that is the public name for it).  I'm not sure an
announcement list would cover this, since I don't think I would
necessarily post such a bug fix to an announcement list (which I
normally associate with 'big' announcements like version 1.0
released).

PB> While trying to use Bugzilla I found this:
PB> http://nagoya.apache.org/bugzilla/show_bug.cgi?id=1559

PB> It seems someone has a different opinion on how to handle PNGs --
PB> exactly the problem I feared to cause :-( Can you check this and
PB> add a comment? Maybe I really should open an account :-(

    This is actually the bug I 'fixed' (and forgot to close - since it
wasn't assigned to me).  I have now marked this bug as invalid and
provided a reason.

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org


Re: PNG display problems in IE5.5

Posted by Peter Becker <pb...@meganesia.int.gu.edu.au>.
Thomas E Deweese wrote:
> 
> >>>>> "PB" == Peter Becker <pb...@meganesia.int.gu.edu.au> writes:
> 
> PB> Hello, I encountered some problems with Batik-generated PNGs in
> PB> IE5.5: the colors where completely wrong (e.g. an orange looked
> PB> light yellow).  Netscape 4.x and my image viewer had no problems.
> 
>     I assume this is with the Batik 1.0 release?
> 
> PB> I tracked this down to line 63 in
> PB> org.apache.batik.transcoger.image.PNGImageTranscoder:
> 
> PB>     params.setGamma(2.4f);
> 
> PB> After I uncommented this line all works well -- so it is probably
> PB> not a bug but a feature in IE ;-)
> 
> PB> What should the change of the gamma value gain? Does uncommenting
> PB> this break something?
> 
>     Actually the use of a gamma of 2.4 was a mistake on our part.
> This points out that IE properly implements PNG and the others don't
> (as much as it pains me to say that :).

Yes, I expected this and I felt esp. bad to notice that my beloved
picture viewer doesn't have this feature :-( But to make you happy
again: IE5.x (and 6b1) fails completely with p:first-letter (CSS) *g* It
produces so serious problems that I had to fall back into XSLT to create
this effect.

>     This bug should be fixed in the current CVS of Batik.

Currently I distribute my two patches (this one and the white edges
problem) as class files with my program -- is this ok or should I use
the CVS version? Will there be an 1.1 or 1.0.1 release in the next time?

Is there a list/place to stay up to date with Batik problems without too
much work? Bugzilla is quite complex and noisy, an announcement list
would be cool ;-)

While trying to use Bugzilla I found this:
  http://nagoya.apache.org/bugzilla/show_bug.cgi?id=1559

It seems someone has a different opinion on how to handle PNGs --
exactly the problem I feared to cause :-( Can you check this and add a
comment? Maybe I really should open an account :-(

Thanks,
  PeterB

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org


PNG display problems in IE5.5

Posted by Thomas E Deweese <th...@kodak.com>.
>>>>> "PB" == Peter Becker <pb...@meganesia.int.gu.edu.au> writes:

PB> Hello, I encountered some problems with Batik-generated PNGs in
PB> IE5.5: the colors where completely wrong (e.g. an orange looked
PB> light yellow).  Netscape 4.x and my image viewer had no problems.

    I assume this is with the Batik 1.0 release?

PB> I tracked this down to line 63 in
PB> org.apache.batik.transcoger.image.PNGImageTranscoder:

PB>     params.setGamma(2.4f);

PB> After I uncommented this line all works well -- so it is probably
PB> not a bug but a feature in IE ;-)

PB> What should the change of the gamma value gain? Does uncommenting
PB> this break something?

    Actually the use of a gamma of 2.4 was a mistake on our part.
This points out that IE properly implements PNG and the others don't
(as much as it pains me to say that :).

    This bug should be fixed in the current CVS of Batik.

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org