https://bitbucket.org/daniel_fort/magic-lantern
Raw File
Tip revision: 22238632e9e49f207595ed03024791b4c5834beb authored by Bilal Fakhouri on 02 July 2018, 22:58:09 UTC
crop_rec.c Added new preset "mv1080 in EOS M" it's worked for patching mv1080 into mv720 in Canon 700D ,, and the two cameras shares the same values but it didn't work for EOS M the resolution stayed 1736x696 unlike in canon 700D 1736x1158 .
Tip revision: 2223863
module_strings_dump.py
# print the module_strings section from a ML module (*.mo)
# sorry, not compatible with Python 3 (patches welcome)
import os, sys
from struct import unpack

def getLongLE(d, a):
   return unpack('<L',(d)[a:a+4])[0]

def getString(d, a):
    return d[a : d.index('\0',a)]

strings = open(sys.argv[1], "rb").read()

# iterate through all module strings
a = 0
while getLongLE(strings, a):
    key = getString(strings, getLongLE(strings, a))
    val = getString(strings, getLongLE(strings, a+4)).strip("\n")
    # display max 3 lines, indented to match the other strings
    val = "\n              ".join(val.split("\n")[0:3]) \
        + (" [...]" if val.count("\n") > 3 else "")
    print("%-12s: %s" % (key, val))
    a += 8
back to top