On Thu, 24 Mar 2022 02:52:08 GMT, Phil Race <[email protected]> wrote:
>> src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageWriter.java
>> line 1740:
>>
>>> 1738: raster.setRect(sourceLine);
>>> 1739: if (invertCMYK) {
>>> 1740: byte[] data =
>>> ((DataBufferByte)raster.getDataBuffer()).getData();
>>
>> Is it known that the type of the raster here is always DataBufferByte?
>
> yes
As far as I understand the in the read code we create a DataBufferByte so later
we can use the cast. But in this method we do not create it, and use what the
user provide to us, can the user "craft custom " raster/metadata and the cs
type?
-------------
PR: https://git.openjdk.java.net/jdk/pull/7849