logo       

Color changes when transcoding PNGs: msg#00098

Subject: Color changes when transcoding PNGs
Hello,

after upgrading to Batik 1.1.1 I have some problems getting the color of PNGs right. Basically I just run PNGTranscoder on an SVG file and e.g. #EE9D00 (given as fill="rgb(236,158,0)" for a <rect>) turns into #F6A100. The JPEGTranscoder works fine. Problem can be reproduced by running batik-rasterizer.jar from 1.1.1 on this:

<?xml version="1.0" encoding="UTF-8"?>
<svg width="500" height="70">
<filter id="dropShadow" filterUnits="userSpaceOnUse" x="-10" y="-10" width="650" height="100">
   <feFlood result="grey" flood-color="rgb(89,89,89)" flood-opacity="1"/>
   <feOffset in="SourceAlpha" result="offset" dx="2" dy="1"/>
   <feComposite operator="in" in="grey" in2="offset" result="shadow"/>
   <feComposite in="SourceGraphic" in2="shadow" operator="over"/>
 </filter>
 <rect fill="rgb(236,158,0)" x="0" y="0" width="500" height="70"/>
 <rect fill="rgb(255,255,255)" x="20" y="10" width="460" height="50"/>
 <rect fill="rgb(89,89,89)" x="21" y="11" width="458" height="48"/>
 <rect fill="rgb(255,255,255)" x="25" y="15" width="450" height="40"/>
<text font-family="Arial" font-weight="bold" font-size="32" fill-opacity="1" fill="rgb(236,158,0)" stroke-opacity="1" stroke-width="3" color="rgb(236,158,0)" text-anchor="middle" x="250" y="45" filter="url(#dropShadow)">oopsala</text>
</svg>

The problem disappears when the filter effect or the whole <text> is removed. Transcoding this SVG with batik-rasterizer into a JPEG failed somehow (empty image of appropriate size). Is this wrong:

   java -jar batik-rasterizer.jar -m image/jpeg -q 0.5 image.svg

?

The original problem appears on Win98/JDK1.4 and SuSE7.3/JDK1.4, all debugging was done with Linux.

Any ideas what's going on?

Thanks,
  Peter


---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xxxxxxxxxxxxxx
For additional commands, e-mail: batik-users-help@xxxxxxxxxxxxxx




<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
boot-loaders.gr...    php.pear.genera...    debugging.valgr...    kde.redhat.user...    text.xml.xsl.ge...    culture.languag...    hardware.microc...    java.servicemix...    redhat.release....    web.zope.plone....    user-groups.lin...    opendarwin.webk...    video.mjpeg.use...    sysutils.bcfg2....    encryption.gpg....    lx-office.devel...    xfree86.forum/2...    mail.mutt.devel...    acpi.devel/2003...    qnx.openqnx.dev...    network.irc.irs...    freebsd.devel.m...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe