Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - FelixJongleur42

Pages: [1]
1
General Development Discussion / Small improvement to mkdoc-cam.py
« on: December 29, 2016, 02:51:09 AM »
(sorry, I have not found any information on how the process of source code contribution actually is - so I hope this is the right way)

Hi there,
   I just started compiling ML myself, and found an improvement I had to make to to the following script.
Can someone review this change and commit it?

Code: [Select]
linux-eq96:~/magic-lantern # hg diff doc/mkdoc-cam.py
diff -r 4f72a0eabb16 doc/mkdoc-cam.py
--- a/doc/mkdoc-cam.py  Sun Dec 18 15:08:37 2016 +0200
+++ b/doc/mkdoc-cam.py  Thu Dec 29 02:39:05 2016 +0100
@@ -180,7 +180,7 @@

 # from remap.py
 from pylab import *
-import Image
+from PIL import Image


 def read_ch(f):

this is according to: http://stackoverflow.com/a/29027755/1747140
(simply adding "from PIL")

The original error I got was:
Code: [Select]
remapping cam/page-001.png...
Traceback (most recent call last):
  File "mkdoc-cam.py", line 280, in <module>
    convert_page(i)
  File "mkdoc-cam.py", line 273, in convert_page
    save_img(imr[1:481,0:720],M,bmp)
  File "mkdoc-cam.py", line 252, in save_img
    ix.save(file)
  File "/usr/lib64/python2.7/site-packages/PIL/Image.py", line 1687, in save
    format = EXTENSION[ext]
KeyError: '.bmp'
../../Makefile.inc:49: recipe for target 'docs' failed
make[1]: *** [docs] Error 1
make[1]: Leaving directory '/root/magic-lantern/platform/all'
Makefile:97: recipe for target 'docs' failed
make: *** [docs] Error 2

Pages: [1]