tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kevin J. Menard, Jr. (JIRA)" <...@tapestry.apache.org>
Subject [jira] Created: (TAPESTRY-1706) Rounded corner service fails with 0 byte image buffer.
Date Wed, 15 Aug 2007 03:57:30 GMT
Rounded corner service fails with 0 byte image buffer.

                 Key: TAPESTRY-1706
                 URL: https://issues.apache.org/jira/browse/TAPESTRY-1706
             Project: Tapestry
          Issue Type: Bug
          Components: Contrib
    Affects Versions: 4.1.2
         Environment: MacOS X 10.4
            Reporter: Kevin J. Menard, Jr.

An image with a background color will fail to be created properly.  The problem appears to
be in the call to ImageIO.write(), which does not put anything into the byte buffer.

The following works:


A simple, rounded corner is produced in blue.

The following fails:


The only addition in the failing case is a non-transparent background color.  The logged message
is the following:

23:55:17.230 ERROR! [SocketListener0-0] org.apache.tapestry.contrib.services.impl.RoundedCornerService.service(RoundedCornerService.java:138)
>42> Image generated had zero length byte array from parameters of:
[color:blue, bgColor:red, width:20, height:20, angle:tl, shadowWidth:-1, shadowOpacity:-1.0,
side:null, wholeShadow: false, arcWidth: -1.0, arcHeight:-1.0
 image: BufferedImage@4ca30b: type = 1 DirectColorModel: rmask=ff0000 gmask=ff00 bmask=ff
amask=0 IntegerInterleavedRaster: width = 20 height = 20 #Bands = 3 xOff = 0 yOff = 0 dataOffset[0]

Note that if the service code is modified such that the type is forced to PNG, then the second
example does render properly (red background and all).

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org

View raw message