From aclark at aclark.net Thu Jan 10 18:24:01 2013 From: aclark at aclark.net (Alex Clark) Date: Thu, 10 Jan 2013 12:24:01 -0500 Subject: [Image-SIG] Pillow Python 3 Message-ID: Updates here: - http://blog.aclark.net/2013/01/10/pillow-python-3/ Alex -- Alex Clark ? https://www.gittip.com/aclark4life/ From ashashiwa at gmail.com Mon Jan 28 17:53:44 2013 From: ashashiwa at gmail.com (Jean-Baptiste BUTET) Date: Mon, 28 Jan 2013 17:53:44 +0100 Subject: [Image-SIG] manipulate 16 bits Grey matrix Message-ID: Hi all, I have a 1394 cam that has a 16 bit greyscale output. How can I handle this under PIL ? Matrix has this shape : [ [ ][ ] [ ]...] and come frome libdc1394 wrapper. 8 bit is well recognise and treated : ---------8 Bits---------- matrix = cam0.current_image i = Image.fromarray(matrix) i.save("mypicture.jpg") (or png, or bmp ...) ---------16 bits---------- (code found somewhere) matrix = cam0.current_image if j ==0 : print matrix.size, len(matrix[0]),type(matrix) ## 'F' correspond au mode de conversion : F pour Float, bien s?r ## [667,800] est la taille de l'image ? cr?er, dans mon cas img = Image.fromstring('F',[480,640], matrix) nom = "t"+str(j)+".tif" tiff = nom fim = open(tiff, 'wb') ## Et conversion en entiers, en pr?cisant le nombre de couleurs... img = img.convert('I', colors=65536) ## Sauvegarde au format TIFF. BMP, JPEG, PNG ne sont pas compatibles ## avec le format des donn?es img.save(fim, 'tiff') fim.close() ---------------------------- ---> result Mode: 640x480_Y16 <- 16 bits OK for cam ! Framerate: 30 307200 640 <- lenght of string, width Traceback (most recent call last): File "16save_image.py", line 78, in img = Image.fromstring('F',[481,641], matrix) File "/usr/lib/python2.7/site-packages/PIL/Image.py", line 1797, in fromstring im.fromstring(data, decoder_name, args) File "/usr/lib/python2.7/site-packages/PIL/Image.py", line 594, in fromstring raise ValueError("not enough image data") ValueError: not enough image data I really don't see what the problem... Thanks for response. JB From aclark at aclark.net Tue Jan 29 16:14:16 2013 From: aclark at aclark.net (Alex Clark) Date: Tue, 29 Jan 2013 10:14:16 -0500 Subject: [Image-SIG] manipulate 16 bits Grey matrix References: Message-ID: On 2013-01-28 16:53:44 +0000, Jean-Baptiste BUTET said: > Hi all, > > I have a 1394 cam that has a 16 bit greyscale output. > > How can I handle this under PIL ? > > Matrix has this shape : [ [ ][ ] [ ]...] and come frome libdc1394 > wrapper. 8 bit is well recognise and treated : > ---------8 Bits---------- > > matrix = cam0.current_image > i = Image.fromarray(matrix) > > i.save("mypicture.jpg") (or png, or bmp ...) > > ---------16 bits---------- > (code found somewhere) > matrix = cam0.current_image > if j ==0 : > print matrix.size, len(matrix[0]),type(matrix) > > ## 'F' correspond au mode de conversion : F pour Float, bien s?r > ## [667,800] est la taille de l'image ? cr?er, dans mon cas > > img = Image.fromstring('F',[480,640], matrix) > nom = "t"+str(j)+".tif" > tiff = nom > fim = open(tiff, 'wb') > > ## Et conversion en entiers, en pr?cisant le nombre de couleurs... > img = img.convert('I', colors=65536) > > ## Sauvegarde au format TIFF. BMP, JPEG, PNG ne sont pas compatibles > ## avec le format des donn?es > img.save(fim, 'tiff') > > fim.close() > ---------------------------- > ---> result > Mode: 640x480_Y16 <- 16 bits OK for cam ! > Framerate: 30 > 307200 640 <- lenght of string, width > Traceback (most recent call last): > File "16save_image.py", line 78, in > img = Image.fromstring('F',[481,641], matrix) > File "/usr/lib/python2.7/site-packages/PIL/Image.py", line 1797, in > fromstring > im.fromstring(data, decoder_name, args) > File "/usr/lib/python2.7/site-packages/PIL/Image.py", line 594, in fromstring > raise ValueError("not enough image data") > ValueError: not enough image data > > > I really don't see what the problem... > > Thanks for response. Does it happen with Pillow too? If so, please report the issue here: https://github.com/python-imaging/Pillow/issues > > JB > _______________________________________________ > Image-SIG maillist - Image-SIG at python.org > http://mail.python.org/mailman/listinfo/image-sig -- Alex Clark ? https://www.gittip.com/aclark4life/ From mark.lam at sonovation.com Fri Jan 18 15:56:38 2013 From: mark.lam at sonovation.com (Mark Lam) Date: Fri, 18 Jan 2013 14:56:38 -0000 Subject: [Image-SIG] problem installing PIL 1.1.7 on Python 2.7 Message-ID: <7A94ED6DA25EF64186ED0311D29686C51DEBBEEA@DE-HV1-EX8.tuv.group> Dear Madam/Sir, I am using Python 2.7 and I am trying to install Python Imaging Library 1.1.7. However, there is a problem and the installation stops with message: " pil-1.1.7 win32-pu27.exe has stopped working " How can I fix this problem? Sincerely, Mark Lam -------------- next part -------------- An HTML attachment was scrubbed... URL: From plugger62 at sbcglobal.net Tue Jan 22 17:38:29 2013 From: plugger62 at sbcglobal.net (John Price) Date: Tue, 22 Jan 2013 16:38:29 -0000 Subject: [Image-SIG] Problem Installing PIL for Python 2.7 Message-ID: <1358872701.1820.YahooMailRC@web181304.mail.ne1.yahoo.com> Help needed. I am having problems trying to install PIL for Python 2.7. I get a dialog box that states that 2.7 in not registered. I use Windows 7 as my computer operating system. I also have Python 3.3 installed. Could that be the problem? Thanks for your help, John -------------- next part -------------- An HTML attachment was scrubbed... URL: From julio.carrera at siemens.com Wed Jan 30 16:34:41 2013 From: julio.carrera at siemens.com (Carrera, Julio C) Date: Wed, 30 Jan 2013 15:34:41 -0000 Subject: [Image-SIG] utility to compare two meshes Message-ID: Does anyone know of a module that will quickly determine whether two given triangular meshes are within a given tolerance of each other? Or perhaps point me to the right Python forum to ask this question? Many thanks, Julio Julio Carrera Manager, Fibersim Product Development Siemens Industry Sector Industry Automation Division Siemens PLM Software Specialized Engineering Software Business Segment 200 Fifth Avenue 5th Floor Waltham, MA 02451 U.S.A. Tel: +1 781 250 6859 julio.carrera at siemens.com www.siemens.com/plm -------------- next part -------------- An HTML attachment was scrubbed... URL: