All Downloads are FREE. Search and download functionalities are using the official Maven repository.

panda.roid.image.AndroidImages Maven / Gradle / Ivy

package panda.roid.image;

import java.io.InputStream;

import panda.image.ImageWrapper;
import panda.image.Images;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;

/**
 */
public class AndroidImages extends Images {
	@Override
	public ImageWrapper read(InputStream is) {
		Bitmap bm = BitmapFactory.decodeStream(is);
		if (bm == null) {
			throw new IllegalArgumentException("Invalid image stream");
		}
		return new AndroidImageWrapper(bm);
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy