回答編集履歴

2

そもそも被っているコード部分は省略した

2019/08/14 06:30

投稿

BluOxy
BluOxy

スコア2663

test CHANGED
@@ -1,12 +1,6 @@
1
1
  rgbArrayとは、RGBのピクセルを保持する配列でしょうか?
2
2
 
3
3
  ```java
4
-
5
- BufferedImage image=sourceImages[0];//画像からイメージを取り込む
6
-
7
- int width=image.getWidth();//BufferedImageの幅を返す
8
-
9
- int height=image.getHeight();//BufferedImageの高さを返す
10
4
 
11
5
  int[] rgbArray=new int [width*height];
12
6
 
@@ -18,12 +12,6 @@
18
12
 
19
13
  ```java
20
14
 
21
- BufferedImage image=sourceImages[0];//画像からイメージを取り込む
22
-
23
- int width=image.getWidth();//BufferedImageの幅を返す
24
-
25
- int height=image.getHeight();//BufferedImageの高さを返す
26
-
27
15
  int[] rgbArray = image.getRGB(0, 0,width,height,rgbArray,0,width);
28
16
 
29
17
  ```

1

widthとheightは削っちゃいけなかった。

2019/08/14 06:29

投稿

BluOxy
BluOxy

スコア2663

test CHANGED
@@ -20,6 +20,10 @@
20
20
 
21
21
  BufferedImage image=sourceImages[0];//画像からイメージを取り込む
22
22
 
23
+ int width=image.getWidth();//BufferedImageの幅を返す
24
+
25
+ int height=image.getHeight();//BufferedImageの高さを返す
26
+
23
27
  int[] rgbArray = image.getRGB(0, 0,width,height,rgbArray,0,width);
24
28
 
25
29
  ```