Claus Ibsen created CAMEL-27815:
-----------------------------------

             Summary: 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
             Fix For: 4.25.0


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_



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to