[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)

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)

Similar Messages

  • Converting a image file (JPG or BMP or any other) to an Image object

    Hello, does anyone have an idea of how I could convert a image file (JPG, BMP, GIF or any other) or even a Corel Draw (.CDR) file to a java Image object?
    Thanks in advance
    Wilson

    Demo:
    import java.awt.image.*;
    import java.io.*;
    import java.net.*;
    import javax.imageio.*;
    import javax.swing.*;
    public class ImageResized {
        public static void main(String[] args) throws IOException {
            URL url = new URL("http://today.java.net/jag/bio/JagHeadshot.jpg");
            BufferedImage image = ImageIO.read(url);
            Icon icon = new ImageIcon(image);
            JLabel label = new JLabel(icon);
            JFrame f = new JFrame();
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            f.getContentPane().add(label);
            f.pack();
            f.setLocationRelativeTo(null);
            f.setVisible(true);
    }

  • Converting GIF images to JPG - display problems in browser

    I am currently writing a program that uses the ImageIO package (javax.imageio.*) to take GIF and PNG images and convert them to JPG images. The program seems to convert them correctly, especially for the PNG images, but the converted GIF images don't open in a browser. They open just fine in Windows Picture and Fax viewer, but when I try to open them in IE or Firefox, it only diplays the little red 'x'.
    Is anyone familiar enough with Images and the ImageIO package in Java that they may have some insight on why these converted GIF files won't display in a browser.

    Bonjour,
    In my [website|http://iweb.debutersurmac.com>, all the images are JPG files,
    By default iWeb '09 converts images to JPG (yes, it's true)...
    ...unless you use masked images*
    !http://i32.servimg.com/u/f32/09/02/44/99/masked10.jpg!
    Crop your images (with Preview) before you paste them in iWeb. Don't use mask, Unmask an image if it's masked. That's the trick!
    !http://i32.servimg.com/u/f32/09/02/44/99/unmask10.jpg!
    (* images with transparency areas (ex : some PNG and GIF), rotation and shapes in iWeb make also PNG files in your website.)

  • Problem in saving image to jpg

    Hello.
    I've got a problem in saving a LabView Picture in a jpg File.
    The picture id grabbed from a DirectX Livestream from a camera.
    Then I want to save it in a jpg file using the Standard LabView Functions.
    But all I get is an empty jpg File and an error:
    Check_Data_size.vi
    Error 1
    I'm using LabView 7.1.
    Has anybody got an idea how to solve the problem?

    No.  You can save a gray image to jpg, but I has to be 24 bit.
    Try save your data to bmp.  If you got the same problem, that means you fail to wire correct data format to the LabVIEW VI you're using.
    George Zou
    http://gtoolbox.yeah.net
    George Zou
    http://webspace.webring.com/people/og/gtoolbox

  • How can i convert CR2 images into jpg format, without iPhoto?

    i just import a lot of images with the format .CR2 to mac through "Image capture" is there an app to convert the frmat into .jpg, app like image capture or something like that?

    If Canons software doesn't work...?
    Try Snap Converter, File Juicer or Contenta Converter

  • Problems converting PNG image to SVG with autotrace

    Hi,
    I am trying to convert a large number of color PNG images of hieroglyphs (produced after much effort) to SVG format, using "autotrace -background-color ffffff -output-format svg".
    It seems that where there are closed paths with background color inside, autotrace produces an SVG image with the background area in black instead of transparency. (You can see the images at http://5b4az.chronos.org.uk/pkg/hieroglyph/A001.png and http://5b4az.chronos.org.uk/pkg/hieroglyph/A001.svg although the svg image is not rendered by Firefox). You may also download the tarballs with all the hieroglyphs of the Gardiner set if you are interested.
    After all the effort that went into these images, I am stuck with being unable to convert raster images to vector graphics. I did try autotrace before I put in all this effort, but I didn't notice the problem because apparently I tried it on images with no enclosed background color.....
    Any suggestions wellcome greatefully!
    Last edited by neok (2009-10-17 16:59:31)

    I know this is an old thread, but I did some new testing on some line art and want to post my results.
    I started with a PNG, and converted it to PBM and PGM. I got much better quality doing this conversion with GIMP, as opposed to pngtopnm.
    I traced both formats with autotrace and potrace, which I output to SVG.
    Autotrace accepts PNG, so I did the trace with the original as well.
    I got the highest quality with PGM and potrace.  It also was the smallest file size.
    a close second was PBM with potrace, slightly larger.
    third was autotrace and the PBM, larger still.
    Using the PGM with autotrace was unacceptable, and the file size was HUGE!
    So if black/white is OK: Convert PNG to PGM with GIMP, then potrace
    both the best quality, and smallest size SVG.  This is assuming you started with anti-aliased black/white line-art, i guess the full greyscale PGM avoids the aliasing of PBM.
    It seems autotrace is the way to go, if your forced to deal with multiple colors. 
    I suspect you will need to do many passes and really tweak those command options,
    The PNG directly to autotrace was a complete disaster, but i suspect it would improve given enough time to configure command arguments.
    However, even with those perfect options I would believe potrace yields a cleaner trace.

  • Can PS convert Flash images to .jpg?

    Hey all - I've used Firefox to save a series of images pulled from an Adobe Flash slideshow on Flickr. Does Photoshop have the ability to convert these files to .jpg? Would it be as easy as doing a "File...Save As", or will I need to incorpotate another program? I have the Master Collection, if any of those would be required. Thanks for your help.

    I don't think that you can open flash files in photoshop
    And I don't know if other program could do. As far as I know, you can produce flash files in Director bat files like yours can not be opened and take images back from them.
    Although a solution you can use is to "capture" the image with the print screen faction, explaining:
    ran the flash file
    and when you see the picture you like, hit the "print screen" button (key) on your keyboard, it is somewhere at the upper right corner on keyboard, normally next to "scroll lock" key. The text on the key that you are looking fo is "Prt Sc" or something like that.
    Next go to photoshop, select new file from file menu,
    and when new file opens, select paste from the edit menu, and you see your screen of when you used the print screen.
    Now you only have to crop the image from flash out of the whole image.
    good luck
    Yani

  • Converting .EPS images to .JPG Images

    Hi all,
    I am trying to convert .EPS files to .JPG images.Can you suggest me some API which does this or which works on EPS files?
    Thanks

    ImageMagick?

  • Converting raw images into .jpgs.

    I took some pictures with my Canon 5D, using the camera's raw format. They turned out to be about 14MB. However, when I converted them to .jpgs, using Photoshop CC, they were only about 4MB. I needed to have .jpgs about 10 MB. How do I do that? I made them the highest quality, etc. I still could only get about 4MB in size. Do I have to lose all that data just by converting them to .jpg? Thank you for any help!

    file size in MB is a very poor criterion for judging image quality because reduction in file size is very dependent upon the original image content.
    Compare a complex multicolored photo converted to .jpg with an image (same original size) filled with pure white or gray or black; then compare the .jpg sizes.
    As indicated above, use .tif or other uncompressed (lossless) file format to retain image quality....use .png if image needs to keep transparency.
    Consider using camera settings to produce both raw and .jpg images from same shot (too late for images already shot) and compare/use whichever suits your needs best. 
    There are many (many free) progs to convert various raw formats to .jpg; some better than others, all results will be at least slightly different.

  • How to convert RAW images to JPG in Imagebrowser EX 1.4.0.5

    I installed ImagBrowser EX so I can view my raw images.  It works fine for viewing but I can't find how to convert them to raw images.  The manual and help file says to go to Edit > Process RAW Images but when I go to the edit menu, there is no such option.  There is only Correct red-eye, auto correct, adjust color and brightness, increase sharpness, crop imae, insert text, edit movies and extract multiple images from movie
    Help?

    You need to install Canon Digital Photo Professional from the camera-supplied CD.
    John Hoffman
    Conway, NH
    1D Mark IV, Rebel T5i, Pixma PRO-100, MX472

  • Problem rendering still images

    I have Core i7 with GTX690. Cuda works fine... everything works fine.  It renders videos very fine but when there comes a still image...Rendering stops Applications stops, my mouse pointer starts moving slow.
    Then i started opening those images in photoshop and saved them again as a new jpeg images. it solved the problem for some images... but not for all.
    Please somebody help.
    Hassan

    What are the dimensions of your sequence and the stills.
    Stills need to be RGB.

  • Does Aperture 2 have a way of converting raw images to png or jpeg.

    Does Aperture 2 have a way of converting raw images to png or jpeg

    That's why we're here
    In regards to your original question converting RAW images to JPGs is one of Apertures reason for being. As Terrence stated once the image is in Aperture ad you've made chatterer adjustments you want to it you then can export the image in a wide array of formats, sizes and qualities depending on what you will be doing with the exported image.
    The Aperture user manual is a good place to start, it's well written and has a lot of good info in it.
    Good luck
    regads

  • When i save any image from any website then there is no option showing in the save as box like saves as .jpg etc. In this case I manually add the extension of image for example .jpg .gif etc. Please solve my problem :(

    When i save any image from any website then there is no option showing in the save as box like saves as .jpg etc. In this case I manually add the extension of image for example .jpg .gif etc. Please solve my problem :(

    I'm guessing your problem is caused by code validation errors: orphaned division tags for example, or mismatched code and document type (i.e.  XHTML /> mixed with HTML > style closures).
    Start by using the code validation tools below and fix any reported.  You'll need an Internet connection for this:
    HTML Validator - http://validator.w3.org 
    CSS Validator - http://jigsaw.w3.org/css-validator/  
    HTML & CSS Tutorials - http://w3schools.com/
    If this doesn't solve the problem, you will need to post a URL to your live page so we can see your code and images working together.   Or at the very least copy and paste your HTML and CSS code into a reply using double arrows >> Syntax Highlighting > Plain.
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists
    www.alt-web.com/
    www.twitter.com/altweb
    www.alt-web.blogspot.com

  • When I converted a file from PDF to WORD.DOC it opened as Read Only and I'm unable to alter any of the text.  How can I solve this problem?

    When I tried to convert a file from PDF to WORD.DOC it opened as Read Only and I'm unable to alter any of the text.  How do I solve this problem?  I don't know how to change it from Read Only.

    Dear Sara
    Thank you very much for sending the converted file.  Yes, I am able to edit it - that will be very useful to me and I appreciate your help.
    Referring to your previous message when you said you'd converted via Acrobat and not Acrobat.com, I'm converting via Acrobat.com because that's the only option that is shown (how do I convert via Acrobat? - perhaps that would be more successful).  I'm using the Export PDF website, and the OCR is enabled to "Recognize text in English UK".  However, I've just tried converting a different LPA pdf form, this time for Health & Welfare https://www.gov.uk/government/uploads/system/uploads/attachment_data/file/245571/LPA114_He alth_welfare_LPA.pdf and again I have the same problem as before.  I've altered it from "Read only" and thought I'd then be able to enter text, but "Drawing Tools" is shown in the pane and I'm unable to enter anything onto the form - everything appears to be in images.  Also, the lettering on the heading of' page 1 has become jumbled, with the word "Public" overlaying the word "Guardian."  Any suggestions as to what it is I'm doing wrong would be welcome - I don't like to be beaten!
    Regards,
    Judith.

  • Problem converting XPS document with large images

    Hi,
    When I try to convert XPS documents to PDF in Acrobat 9.0 Pro, I have problems with "large images". They are either truncated or scaled down. The only images that convert correctly are small images that are not stretched to fill a large area. Attached to this message is a simple example. Does anyone know a way to correct this problem? By the way, the page is slightly larger than the standard Letter size.
    Thanks!

    Thanks for your suggestion! In fact, I am the programmer who creates the XPS files from a .NET document. Our company used the method "Postscript + PDF" during a few months and it worked quite well. Recently, we introduced semi-transparent objects and fonts in our documents and the resulting PS prints look really bad. Since I can create a perfect XPS document, and since Acrobat can convert it to PDF, I gave it a try. It solved all the problems that I had with PS printing but there is that thing with images... Anyway, since Acrobat converts XPS to PDF, I guess they should try to solve the bug with the images. As for me, I will see if I can get a component to create PDF documents directly from our application.

Maybe you are looking for

  • How to delete the games in asha 305 which has writ...

    games like casino, golf tour, maze and other inbuilt games are saves in phone how to delete it as they r write protected .... thank u 

  • Oc4j r2: Problem with CMP deployment from JDeveloper 9i.

    Hi, When deploying a CMP Entity from jdeveloper, the actual table name used for looking up the bean by the container is modified to the Entities name ( meaning - not the one which i specified in the orion-ejb.xml myself) . Has anyone stubmled across

  • Logic Studio quitting unexpectedly

    Logic Studio quits unexpectedly after I installed steinberg cubase LE 5. Even after deleting Cubase, Logic still quits unexpectedly. As Logic Studio is my main app I need to make sure I can get access to it. Can anyone please help me. - Jim.

  • Albums with different artists appear separately in Album view.

    Hi, As can be seen in the screen shot below, Album view displays songs separately if they are from different artists but from the same album. this is also a problem in iPhone 3G album view. I see multiple copies of album name each with different set

  • CMIS connector save behavior on Mac OSX question

    I've been working on implementing a CMIS compliant server and have a question about the behavior of Adobe Drive when saving files on Mac OSX. When an application saves a file to the network drive, Adobe Drive is sending a request to create a folder n