You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by "Alexander Klimetschek (JIRA)" <ji...@apache.org> on 2007/09/17 23:10:43 UTC

[jira] Reopened: (COCOON-2048) ImageOp: overlay a transparent image on another one

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

Alexander Klimetschek reopened COCOON-2048:
-------------------------------------------


There is a bug around line 243 after that patch: the creation of the BufferedImage can lead to a "This method is not supported by this color model" exception. A workaround is to use cm.isAlphaPremultiplied() as last parameter:


	        // Note: use cm.isAlphaPremultiplied() as third parameter
	        // (isRasterPremultiplied) because this avoids the possible
	        // non-working call to cm.coerceData() (eg. with png images) -
	        // see the code of BufferedImage
            newImage = new BufferedImage( cm, src, cm.isAlphaPremultiplied(), new Hashtable() );

> ImageOp: overlay a transparent image on another one
> ---------------------------------------------------
>
>                 Key: COCOON-2048
>                 URL: https://issues.apache.org/jira/browse/COCOON-2048
>             Project: Cocoon
>          Issue Type: New Feature
>          Components: Blocks: ImageOp
>    Affects Versions: 2.2-dev (Current SVN)
>            Reporter: Alexander Klimetschek
>            Assignee: Lars Trieloff
>             Fix For: 2.2-dev (Current SVN)
>
>         Attachments: delete.png, imageop-overlay-operation-sample.patch, imageop-overlay-operation.patch
>
>
> New OverlayOperation that puts another image on top of the image used by the ImageOpReader. Useful to overcome problems with browsers like IE that cannot put a transparent <img> on top of a background image.
> Example usage:
>      <map:read type="image-op-overlay" src="background-image.jpg" >
>           <map:parameter name="overlay-offset-x" value="10" />
>           <map:parameter name="overlay-offset-y" value="20" />
>           <map:parameter name="overlay-source" value="overlay-image.png"/>
>      </map:read>

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