#Why does it disable this encoder?

9 messages · Page 1 of 1 (latest)

tender wyvern
#

I am try to use this code to create a pixelbuffer:
val pixelBuffer = PixelBuffer(widths, heights, buffer, PixelFormat.getByteRgbInstance())
If I am running it, the constructor of PixelBuffer will throw a exception:Unsupported PixelFormat: BYTE_RGB
I see that these formats has been specifically implemented in the source code,but the constructor use a switch to filter them that make them will be never arrived.

        switch (pixelFormat.getType()) {
            case BYTE_BGRA_PRE:
                  ...
            case INT_ARGB_PRE:
                  ...
            default:
                throw new IllegalArgumentException("Unsupported PixelFormat: " + pixelFormat.getType());
        }

Why does javafx need to disable other format?

bright lindenBOT
#

This post has been reserved for your question.

Hey @tender wyvern! Please use /close or the Close Post button above when you're finished. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.

TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.

jovial summit
#

they may be planning it add it later on but not now

#

doc does say The type of the specified PixelFormat must be either PixelFormat.Type.INT_ARGB_PRE or PixelFormat.Type.BYTE_BGRA_PRE.

#

@tender wyvern

tender wyvern
jovial summit
#

dk its upto devs

tender wyvern
#

Thanks for help