Package boofcv.io.image
Class ConvertRaster
java.lang.Object
boofcv.io.image.ConvertRaster
Routines for converting to and from
BufferedImage
that use its internal
raster for better performance.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
bufferedToGray
(BufferedImage src, byte[] data, int dstStartIndex, int dstStride) static void
bufferedToGray
(BufferedImage src, float[] data, int dstStartIndex, int dstStride) static void
bufferedToGray
(BufferedImage src, GrayI16 dst) static void
bufferedToGray
(DataBufferByte buffer, WritableRaster src, GrayF32 dst) A faster convert that works directly with a specific rasterstatic void
bufferedToGray
(DataBufferByte buffer, WritableRaster src, GrayU8 dst) A faster convert that works directly with a specific rasterstatic void
bufferedToGray
(DataBufferInt buffer, WritableRaster src, GrayF32 dst) static void
bufferedToGray
(DataBufferInt buffer, WritableRaster src, GrayU8 dst) static void
bufferedToGray
(DataBufferUShort buffer, WritableRaster src, GrayI16 dst) static void
bufferedToInterleaved
(BufferedImage src, InterleavedF32 dst) static void
bufferedToInterleaved
(BufferedImage src, InterleavedU8 dst) static void
bufferedToInterleaved
(DataBufferByte buffer, WritableRaster src, InterleavedF32 dst) static void
bufferedToInterleaved
(DataBufferByte buffer, WritableRaster src, InterleavedU8 dst) static void
bufferedToInterleaved
(DataBufferInt buffer, WritableRaster src, InterleavedF32 dst) static void
bufferedToInterleaved
(DataBufferInt buffer, WritableRaster src, InterleavedU8 dst) static void
bufferedToPlanar_F32
(BufferedImage src, Planar<GrayF32> dst) static void
bufferedToPlanar_F32
(DataBufferInt buffer, WritableRaster src, Planar<GrayF32> dst) static void
bufferedToPlanar_U8
(BufferedImage src, Planar<GrayU8> dst) static void
bufferedToPlanar_U8
(DataBufferInt buffer, WritableRaster src, Planar<GrayU8> dst) static int
static void
grayToBuffered
(GrayF32 src, BufferedImage dst) static void
grayToBuffered
(GrayF32 src, DataBufferByte buffer, WritableRaster dst) static void
grayToBuffered
(GrayF32 src, DataBufferInt buffer, WritableRaster dst) static void
grayToBuffered
(GrayI16 src, BufferedImage dst) static void
grayToBuffered
(GrayI16 src, DataBufferByte buffer, WritableRaster dst) static void
grayToBuffered
(GrayI16 src, DataBufferInt buffer, WritableRaster dst) static void
grayToBuffered
(GrayI16 src, DataBufferUShort buffer, WritableRaster dst) static void
grayToBuffered
(GrayU8 src, BufferedImage dst) static void
grayToBuffered
(GrayU8 src, DataBufferByte buffer, WritableRaster dst) static void
grayToBuffered
(GrayU8 src, DataBufferInt buffer, WritableRaster dst) static void
interleavedToBuffered
(InterleavedF32 src, BufferedImage dst) static void
interleavedToBuffered
(InterleavedF32 src, DataBufferByte buffer, WritableRaster dst) static void
interleavedToBuffered
(InterleavedF32 src, DataBufferInt buffer, WritableRaster dst) static void
interleavedToBuffered
(InterleavedU8 src, BufferedImage dst) static void
interleavedToBuffered
(InterleavedU8 src, DataBufferByte buffer, WritableRaster dst) static void
interleavedToBuffered
(InterleavedU8 src, DataBufferInt buffer, WritableRaster dst) static void
interleavedToBuffered
(InterleavedU8 src, DataBuffer buffer, BufferedImage dst, boolean orderRgb) static boolean
isKnownByteFormat
(BufferedImage image) Checks to see if it is a known byte formatstatic <T extends ImageGray<T>>
voidorderBandsBufferedFromRgb
(Planar<T> image, BufferedImage input) static void
orderBandsBufferedFromRGB
(DataBufferByte buffer, WritableRaster raster, int type) static void
orderBandsBufferedFromRGB
(DataBufferInt buffer, WritableRaster raster, int type) static void
orderBandsIntoRGB
(ImageInterleaved image, BufferedImage input) static <T extends ImageGray<T>>
voidorderBandsIntoRGB
(Planar<T> image, BufferedImage input) If a Planar was created from a BufferedImage its colors might not be in the expected order.static void
planarToBuffered_F32
(Planar<GrayF32> src, DataBuffer buffer, BufferedImage dst) A faster convert that works directly with a specific rasterstatic void
planarToBuffered_U8
(Planar<GrayU8> src, BufferedImage dst) static void
planarToBuffered_U8
(Planar<GrayU8> src, DataBufferByte buffer, WritableRaster dst) static void
planarToBuffered_U8
(Planar<GrayU8> src, DataBufferInt buffer, WritableRaster dst) static int
static boolean
swapBandOrder
(BufferedImage input)
-
Constructor Details
-
ConvertRaster
public ConvertRaster()
-
-
Method Details
-
bufferedToGray
-
bufferedToGray
-
bufferedToGray
-
bufferedToGray
A faster convert that works directly with a specific raster -
bufferedToGray
A faster convert that works directly with a specific raster -
stride
-
planarToBuffered_F32
A faster convert that works directly with a specific raster -
interleavedToBuffered
public static void interleavedToBuffered(InterleavedU8 src, DataBuffer buffer, BufferedImage dst, boolean orderRgb) -
getOffset
-
orderBandsIntoRGB
If a Planar was created from a BufferedImage its colors might not be in the expected order. Invoking this function ensures that the image will have the expected ordering. For images with 3 bands it will be RGB and for 4 bands it will be ARGB. -
orderBandsBufferedFromRgb
public static <T extends ImageGray<T>> void orderBandsBufferedFromRgb(Planar<T> image, BufferedImage input) -
bufferedToGray
public static void bufferedToGray(BufferedImage src, float[] data, int dstStartIndex, int dstStride) -
bufferedToGray
-
bufferedToGray
-
orderBandsIntoRGB
-
swapBandOrder
-
interleavedToBuffered
-
orderBandsBufferedFromRGB
public static void orderBandsBufferedFromRGB(DataBufferByte buffer, WritableRaster raster, int type) -
orderBandsBufferedFromRGB
-
interleavedToBuffered
public static void interleavedToBuffered(InterleavedU8 src, DataBufferByte buffer, WritableRaster dst) -
interleavedToBuffered
public static void interleavedToBuffered(InterleavedU8 src, DataBufferInt buffer, WritableRaster dst) -
interleavedToBuffered
public static void interleavedToBuffered(InterleavedF32 src, DataBufferByte buffer, WritableRaster dst) -
interleavedToBuffered
public static void interleavedToBuffered(InterleavedF32 src, DataBufferInt buffer, WritableRaster dst) -
interleavedToBuffered
-
planarToBuffered_U8
public static void planarToBuffered_U8(Planar<GrayU8> src, DataBufferByte buffer, WritableRaster dst) -
planarToBuffered_U8
public static void planarToBuffered_U8(Planar<GrayU8> src, DataBufferInt buffer, WritableRaster dst) -
planarToBuffered_U8
-
grayToBuffered
-
grayToBuffered
-
grayToBuffered
-
bufferedToPlanar_U8
public static void bufferedToPlanar_U8(DataBufferInt buffer, WritableRaster src, Planar<GrayU8> dst) -
bufferedToPlanar_U8
-
bufferedToPlanar_F32
public static void bufferedToPlanar_F32(DataBufferInt buffer, WritableRaster src, Planar<GrayF32> dst) -
bufferedToPlanar_F32
-
bufferedToInterleaved
public static void bufferedToInterleaved(DataBufferByte buffer, WritableRaster src, InterleavedU8 dst) -
bufferedToInterleaved
-
bufferedToInterleaved
public static void bufferedToInterleaved(DataBufferInt buffer, WritableRaster src, InterleavedU8 dst) -
bufferedToInterleaved
public static void bufferedToInterleaved(DataBufferByte buffer, WritableRaster src, InterleavedF32 dst) -
bufferedToInterleaved
-
bufferedToInterleaved
public static void bufferedToInterleaved(DataBufferInt buffer, WritableRaster src, InterleavedF32 dst) -
grayToBuffered
-
grayToBuffered
-
grayToBuffered
-
grayToBuffered
-
grayToBuffered
-
grayToBuffered
-
grayToBuffered
-
isKnownByteFormat
Checks to see if it is a known byte format
-