java - android equivalent code for graphics2D -
i have been trying android equivalent code following :-
private bufferedimage user_space(bufferedimage image) { bufferedimage new_img = new bufferedimage(image.getwidth(), image.getheight(), bufferedimage.type_3byte_bgr); graphics2d graphics = new_img.creategraphics(); graphics.drawrenderedimage(image, null); graphics.dispose(); return new_img; }
i want android equivalent of graphics2d. have been searching while , found out canvas in android can similar tasks performed graphics2d class here main problem i'm not getting android equivalent of whole process being performed in code. please asap...
android not have bufferedimage
or graphics2d
found out.
i'm not java developer (just android) i'm not 100% sure on you're trying achieve, seems me you're creating copy of image.
here few classes you'll using type of manipulation:
bitmap: that's bufferedimage, it's object stores bytes image (possibly large object potential memory crash). there're static methods here copy bitmaps, create new mutable or immutable bitmaps, scale, or compress png or jpg stream.
bitmapfactory: lots of static methods create new bitmaps resources, files, streams, etc.
canvas: you'll use 1 if want draw on image (overlay image, put text, or line, stuff that)
Comments
Post a Comment