質問編集履歴
1
書式の改善
title
CHANGED
File without changes
|
body
CHANGED
@@ -1,7 +1,30 @@
|
|
1
1
|
https://qiita.com/knyrc/items/a39a7433857e83cf39a8
|
2
2
|
|
3
|
+
このサイトを参考に
|
4
|
+
```ターミナル
|
5
|
+
python png2c.py JUSTICE.png
|
6
|
+
```
|
7
|
+
とターミナルに打った時に
|
8
|
+
```ターミナル
|
9
|
+
Traceback (most recent call last):
|
10
|
+
File "png2c.py", line 77, in <module>
|
11
|
+
main(sys.argv[1:])
|
12
|
+
File "png2c.py", line 43, in main
|
13
|
+
for i in range(0, (320*120) / 8):
|
3
|
-
|
14
|
+
TypeError: 'float' object cannot be interpreted as an integer
|
15
|
+
```
|
16
|
+
というエラーが出ました、
|
4
17
|
サイト内に
|
5
18
|
「png2c.py の中身1行が Python2 系の記載なので Python3 系で利用する場合、その点下記の修正が必要です。」
|
19
|
+
|
20
|
+
変更前
|
21
|
+
```png2c.py
|
22
|
+
for i in range(0, 320*120) / 8):
|
23
|
+
```
|
24
|
+
|
25
|
+
変更後
|
26
|
+
```png2c.py
|
27
|
+
for i in range(0, 4800):
|
28
|
+
```
|
6
|
-
と書かれていたのですが、修正の仕方がわかりません
|
29
|
+
と書かれていたのですが、修正の仕方がわかりません。
|
7
30
|
なので、どなたか修正の方法を教えていただければ幸いです。
|