Advertisement
Guest User

Untitled

a guest
Jan 17th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. public Bitmap setWatterMark(Bitmap bitmap){
  2. Bitmap bitmap1 = bitmap.copy(Bitmap.Config.ARGB_8888,true);
  3. for (int i = 0;i<bitmap.getWidth();i+=4){
  4. bitmap1.setPixel(i,2, Color.rgb(59,45,11));
  5. }
  6. return bitmap1;
  7. }
  8. public boolean checkForWattermark(Bitmap bitmap){
  9.  
  10. for (int i= 0;i<bitmap.getWidth();i+=4){
  11. if (bitmap.getPixel(i,2)!=Color.rgb(59,45,11)){
  12. return false;
  13. }
  14. }
  15. return true;
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement