logo       

Re: incomplete rastorization?: msg#00041

Subject: Re: incomplete rastorization?
Hi Dave, Mark

>>>>> "DC" == Dave Carlson <dcarlson@xxxxxxxxxxxxxx> writes:

DC> I also wrestled with a similar problem last week.  Looking into
DC> the image export code from Squiggle, it seems that it uses the
DC> offscreen image from the current swing view to produce the
DC> exported image (in PNG or JPG).  If the entire image is not
DC> visible, it will not be saved to the image file.

DC> I rewrote these exporters to render their own new image using the
DC> full image size, and not reuse the current offscreen buffer.

    I think this is intentional in Squiggle. The goal is to save the
'current view' to disk.  However I could see how your mode might be
preferable in some cases (one would need to be very careful as if you
were zoomed in a lot the resultant file could be huge).

MM>   I'm evaluating Batik 1.5beta4b's Rasterizer utility but am
MM> encountering problems.  My goal is to generate a PDF from an image
MM> drawn inside Swing.  To that end, I'm using the SVGGraphics2D
MM> class to paint the component's contents and write image to an SVG
MM> file.  The resulting SVG file renders fine inside Internet
MM> Explorer and Squiggle.  However, when I try to convert the SVG
MM> file to anything (PDF, JPEG, whatever), only the top quarter
MM> (approximately) is Rasterized.?.?  I've tried passing in command
MM> line arguments such as:

MM>   % java org.apache.batik.apps.rasterizer.Main -m image/jpg -a
MM> 0,0,1000,1000 test.svg.  However, the same amount of image is
MM> captured.  Larger AOIs just seem to make the final result image
MM> smaller.  Has anyone ever encountered this?

    I suspect something is 'off' in the generated SVG, it would be
helpful to see the SVG document you are trying to rasterize.  I
suspect something in the viewbox or width/height attributes on the
outermost svg element, or a clip path is causing problems - but it
isn't clear why it would render fine in Squiggle but not with the '-a'
option in the rasterizer.


<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