You are not logged in.

#1 2013-05-27 20:32:14

keen90
Member
From: Europe
Registered: 2010-04-07
Posts: 106

[SOLVED] python problem convert YUV422 images to jpgs

I hope this is not off topic - but I'm trying this running arch linux, so it is somewhat arch related...

I have some YUV422 images and want to convert them to jpgs. I've found this pyhthon script which should do the job.
https://bitbucket.org/hudson/magic-lant … 422-jpg.py
But I guess i am doing something wrong.
It starts with: I don't know with which python command I can run the script.

$ python 422-jpg.py .
  File "422-jpg.py", line 54
    print "Wrong number of subpictures (%d)" % numpics
                                           ^
SyntaxError: invalid syntax
$ python2 422-jpg.py .
Traceback (most recent call last):
  File "422-jpg.py", line 10, in <module>
    import numpy
ImportError: No module named numpy
$ python3 422-jpg.py .
  File "422-jpg.py", line 54
    print "Wrong number of subpictures (%d)" % numpics
                                           ^
SyntaxError: invalid syntax

most promising seemes to me the python2 command. But I don't understand the numpy problem. I know the script uses pythons image libraries but actually I installed them:

pacman -Suy python-numpy
pacman -Suy python2-imaging

or does the script just not find the libs?
I'm a bit stuck here for I don't know python very well.

Thanks in advance

(BTW I need this because I extended my cameras firmware with magiclantern to create time lapse movies, but disabling the mirror mechnism automatically leads to *442 images instead of jpgs - sigh)

Last edited by keen90 (2013-05-29 16:57:36)

Offline

#2 2013-05-28 18:05:48

rebootl
Member
Registered: 2012-01-10
Posts: 431
Website

Re: [SOLVED] python problem convert YUV422 images to jpgs

Hi
I think it's simply missing numpy for python2.
It's: extra/python2-numpy

Greez

Edit: Alternatively imagemagick could probably do the job.

Last edited by rebootl (2013-05-28 18:09:26)


Personal website: reboot.li
GitHub: github.com/rebootl

Offline

#3 2013-05-29 16:57:23

keen90
Member
From: Europe
Registered: 2010-04-07
Posts: 106

Re: [SOLVED] python problem convert YUV422 images to jpgs

It works !!!

Thank you soooo much!

Offline

Board footer

Powered by FluxBB