tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jesse Kuhnert (JIRA)" <...@tapestry.apache.org>
Subject [jira] Resolved: (TAPESTRY-1706) Rounded corner service fails with 0 byte image buffer.
Date Thu, 16 Aug 2007 20:39:31 GMT

     [ https://issues.apache.org/jira/browse/TAPESTRY-1706?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Jesse Kuhnert resolved TAPESTRY-1706.
-------------------------------------

       Resolution: Fixed
    Fix Version/s: 4.1.3
         Assignee: Jesse Kuhnert

Gif format isn't supported in the jre platform until ver 1.6 so added logic to detect supported
formats and fall back to jpeg when gif isn't available.

> 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 Menard
>            Assignee: Jesse Kuhnert
>             Fix For: 4.1.3
>
>
> 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:
> http://localhost:8080/rounded?c=blue&w=20&h=20&shadow=false&a=tl
> A simple, rounded corner is produced in blue.
> The following fails:
> http://localhost:8080/rounded?c=blue&bc=red&w=20&h=20&shadow=false&a=tl
> 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]
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


Mime
View raw message