[
https://issues.apache.org/jira/browse/CAMEL-27815?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Claus Ibsen updated CAMEL-27815:
--------------------------------
Description:
Found while improving the option descriptions of camel-djl for CAMEL-23832
(commit
https://github.com/apache/camel/commit/76b15186608df88e4e2421561d9386dd56102b49,
pull request https://github.com/apache/camel/pull/31139).
This is a separate problem of the component; the descriptions change only
documents the current behavior.
h4. Unknown file type gives an empty result
{{DJLConverter.toBytes}} saves the image with the CamelDjlFileType format; when
javax.imageio has no writer for it, ImageIO.write returns false, DJL ignores
that, and the result is an empty byte[] without an error.
Proposed change: check for a writer first and fail with the name of the format.
_Claude Code on behalf of davsclaus_
was:
Found while improving the option descriptions of camel-djl for CAMEL-23832
(pull request https://github.com/apache/camel/pull/31139).
This is a separate problem of the component; the descriptions change only
documents the current behavior.
h4. Unknown file type gives an empty result
{{DJLConverter.toBytes}} saves the image with the CamelDjlFileType format; when
javax.imageio has no writer for it, ImageIO.write returns false, DJL ignores
that, and the result is an empty byte[] without an error.
Proposed change: check for a writer first and fail with the name of the format.
_Claude Code on behalf of davsclaus_
> camel-djl: an image file type without an ImageIO writer gives an empty byte
> array
> ---------------------------------------------------------------------------------
>
> Key: CAMEL-27815
> URL: https://issues.apache.org/jira/browse/CAMEL-27815
> Project: Camel
> Issue Type: Bug
> Reporter: Claus Ibsen
> Priority: Minor
> Fix For: 4.25.0
>
>
> Found while improving the option descriptions of camel-djl for CAMEL-23832
> (commit
> https://github.com/apache/camel/commit/76b15186608df88e4e2421561d9386dd56102b49,
> pull request https://github.com/apache/camel/pull/31139).
> This is a separate problem of the component; the descriptions change only
> documents the current behavior.
> h4. Unknown file type gives an empty result
> {{DJLConverter.toBytes}} saves the image with the CamelDjlFileType format;
> when javax.imageio has no writer for it, ImageIO.write returns false, DJL
> ignores that, and the result is an empty byte[] without an error.
> Proposed change: check for a writer first and fail with the name of the
> format.
> _Claude Code on behalf of davsclaus_
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)