[
https://issues.apache.org/jira/browse/WICKET-5602?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Patrick Davids updated WICKET-5602:
-----------------------------------
Description:
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 than 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 our database,
and if no profile image is avaliable we fallback to an default icon in svg
format, and here the correct mime-type is important, not to have broken images.
kind regards
was:
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)
od 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 than 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 our database,
and if no profile image is avaliable we fallback to an default icon in svg
format, and here the correct mime-type is important, not to have broken images.
kind regards
> setFormat() of DynamicImageResource is confusing / make private or feature?
> ---------------------------------------------------------------------------
>
> 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 than 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 our database,
> and if no profile image is avaliable we fallback to an 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)