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/06/16 13:01:03 UTC
[jira] [Updated] (WICKET-5602) DynamicImageResource should set the
mime type after reading the image data
[ https://issues.apache.org/jira/browse/WICKET-5602?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Martin Grigorov updated WICKET-5602:
------------------------------------
Summary: DynamicImageResource should set the mime type after reading the image data (was: setFormat() of DynamicImageResource is confusing / make private or feature?)
> DynamicImageResource should set the mime type after reading the image data
> --------------------------------------------------------------------------
>
> Key: WICKET-5602
> URL: https://issues.apache.org/jira/browse/WICKET-5602
> Project: Wicket
> Issue Type: Improvement
> Components: wicket
> Affects Versions: 6.14.0
> Reporter: Patrick Davids
>
> Hi,
> I wondered about the method setFormat(String format) which is public and accessable e.g. in getImageData().
> Overriding getImageData() and calling setFormat() to e.g. changing the format on-the-fly while creating the bytes does not have any effect due to call sequence
> - getFormat()
> - getImageData()
> in newResourceResponse(final Attributes attributes)
> of DynamicImageResource
> This could lead in confusion... so it should be private, I think.
> But, in the other hand, switching the format, could be a nice feature, so maybe leave it public, but then pay intention for calling sequence.
> I would prefer the feature request, because we have a fallback implementation in getImageData() to a another image, with another format, if no bytes are available.
> In our case we blob profile images of users in png format into the database, and if no profile image is avaliable we fallback to a default icon in svg format, and here the correct mime-type is important, not to have broken images.
> kind regards
--
This message was sent by Atlassian JIRA
(v6.2#6252)