You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Martin Grigorov (JIRA)" <ji...@apache.org> on 2014/04/03 17:50:15 UTC

[jira] [Resolved] (WICKET-5551) Image from DynamicImageResource is not generated

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

Martin Grigorov resolved WICKET-5551.
-------------------------------------

    Resolution: Cannot Reproduce

> Image from DynamicImageResource is not generated
> ------------------------------------------------
>
>                 Key: WICKET-5551
>                 URL: https://issues.apache.org/jira/browse/WICKET-5551
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 6.14.0
>         Environment: JRE 1.7.0_25
>            Reporter: Sebastian Scialabba
>
> Wicket 6.14.0 is not creating a dynamic image: the method getImageData is not being called. Example:
> public class AnImage extends NonCachingImage {
> 	private static final long serialVersionUID = 276945146796994753L;
> 	public AnImage(final String id) {
> 		super(id);
> 		setImageResource(new DynamicImageResource() {
> 			private static final long serialVersionUID = 6952266992014253487L;
> 			@Override
> 			protected byte[] getImageData(final Attributes att) {
> 				final ByteArrayOutputStream os = new ByteArrayOutputStream();
> 				try {
> 					final BufferedImage image = loadImage...
> 					ImageIO.write(image, "PNG", os);
> 					setLastModifiedTime(Time.now());
> 					return os.toByteArray();
> 				} catch (final IOException e) {
> 					throw new RuntimeException(e);
> 				}
> 			}
> 		});
> 	}
> 	...
> It works fine in Wicket 6.3.0



--
This message was sent by Atlassian JIRA
(v6.2#6252)