src/main/java/ru/mail/dondokidon/extensions/BitmapCreator.java
/**
     * Copy source bitmap into target bitmap
     *
     * @param source The bitmap which should be copied
     * @param target The bitmap which will contain copied source bitmap in result
     * @param startX The x coordinate of the first pixel to read from the source bitmap
     * @param startY The y coordinate of the first pixel to read from the source bitmap
     * @param width The number of pixels to read from each row
     * @param height The number of rows to read
     *
     * @throws IllegalArgumentException if startX, startY, width, height exceed the
     *         bounds of the source bitmap; if width, height exceed the bounds of target
     *         bitmap
     * @throws IllegalStateException if the source bitmap's config is {@link Config#HARDWARE},
     * if the target bitmap is not mutable
     */


@throws IllegalArgumentException if startX, startY, width, height exceed the
bounds of the source bitmap; if width, height exceed the bounds of target
bitmap
@throws IllegalStateException if the source bitmap's config is  Config#HARDWARE,
if the target bitmap is not mutable
@throws IllegalArgumentException if startX startY width height exceed the bounds of the source bitmap ; if width height exceed the bounds of target bitmap @throws IllegalStateException if the source bitmap ' s config is Config#HARDWARE if the target bitmap is not mutable
public static void copy(@NotNull Bitmap source,@NotNull Bitmap target, int startX, int startY, int width, int height){
        int [] Pixels = new int [width * height];
        source.getPixels(Pixels, 0, width, startX, startY, width, height);
        target.setPixels(Pixels, 0, width, 0, 0, width, height);
    }
public static void copy ( @ NotNull Bitmap source , @ NotNull Bitmap target , int startX , int startY , int width , int height ) { int [ ] Pixels = new int [ width * height ] ; source . getPixels ( Pixels , 0 , width , startX , startY , width , height ) ; target . setPixels ( Pixels , 0 , width , 0 , 0 , width , height ) ; }
Copy source bitmap into target bitmap
 @param source The bitmap which should be copied
 @param target The bitmap which will contain copied source bitmap in result
 @param startX The x coordinate of the first pixel to read from the source bitmap
 @param startY The y coordinate of the first pixel to read from the source bitmap
 @param width The number of pixels to read from each row
 @param height The number of rows to read
Copy source bitmap into target bitmap @param source The bitmap which should be copied @param target The bitmap which will contain copied source bitmap in result @param startX The x coordinate of the first pixel to read from the source bitmap @param startY The y coordinate of the first pixel to read from the source bitmap @param width The number of pixels to read from each row @param height The number of rows to read