Class ImgStreamingUtils
- java.lang.Object
-
- org.jitsi.impl.neomedia.imgstreaming.ImgStreamingUtils
-
public class ImgStreamingUtils extends Object
Provides utility functions used by the imgstreaming package(s).- Author:
- Sebastien Vincent
-
-
Constructor Summary
Constructors Constructor Description ImgStreamingUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static byte[]getImageBytes(BufferedImage src, byte[] output)Get raw bytes from ARGB BufferedImage.static BufferedImagegetScaledImage(BufferedImage src, int width, int height, int type)Get a scaled BufferedImage.
-
-
-
Method Detail
-
getScaledImage
public static BufferedImage getScaledImage(BufferedImage src, int width, int height, int type)
Get a scaled BufferedImage. Mainly inspired by: http://java.developpez.com/faq/gui/?page=graphique_general_images #GRAPHIQUE_IMAGE_redimensionner- Parameters:
src- source imagewidth- width of scaled imageheight- height of scaled imagetype- BufferedImage type- Returns:
- scaled BufferedImage
-
getImageBytes
public static byte[] getImageBytes(BufferedImage src, byte[] output)
Get raw bytes from ARGB BufferedImage.- Parameters:
src- ARGB BufferImageoutput- output buffer, if not null and if its length is at least image's (width * height) * 4, method will put bytes in it.- Returns:
- raw bytes or null if src is not an ARGB BufferedImage
-
-