From fredrik at pythonware.com Wed Jul 5 23:47:30 2006 From: fredrik at pythonware.com (Fredrik Lundh) Date: Wed, 05 Jul 2006 23:47:30 +0200 Subject: [Image-SIG] ANN: PIL 1.1.6 beta 1 (june 20, 2006) In-Reply-To: References: Message-ID: Fredrik Lundh wrote: > The first PIL 1.1.6 beta is now available from effbot.org: > > http://effbot.org/downloads/#Imaging (source) > http://effbot.org/downloads/#PIL (windows binaries) as well as SVN: svn co http://svn.effbot.python-hosting.com/tags/pil-1.1.6b1/ From dtorop933 at gmail.com Thu Jul 6 21:37:03 2006 From: dtorop933 at gmail.com (Dan Torop) Date: Thu, 6 Jul 2006 15:37:03 -0400 Subject: [Image-SIG] frombuffer defaults to flip of fromstring? Message-ID: I was curious whether there was a bug in the default behavior of Image.frombuffer(). Consider the example: import Image out = '\xff\x00\x00\xff\xff\x00\xff\xff\xff' Image.fromstring('L', (3, 3), out).save('string-default.png') Image.frombuffer('L', (3, 3), out).save('buffer-default.png') Image.frombuffer('L', (3, 3), out, 'raw', 'L', 0, 1).save('buffer-oriented-1.png') Running against PIL 1.1.5 I see "buffer-default.png" is upside down compared to "string-default.png". OTOH, "buffer-oriented-1.png" (where the orientation is manually set to 1) matches "string-default.png". The online documentation (http://www.pythonware.com/library/pil/handbook/decoder.htm#h0003) it says re orientation: "Whether the first line in the image is the top line on the screen (1), or the bottom line (-1). If omitted, the orientation defaults to 1." So actual behavior seems to be contrary to both expected and documented behavior. Assuming this is a real problem, a fix to frombuffer (vs. 1.1.6b1) might be: --- Imaging-1.1.6b1/PIL/Image.py.orig 2006-07-06 15:23:16.000000000 -0400 +++ Imaging-1.1.6b1/PIL/Image.py 2006-07-06 15:23:35.000000000 -0400 @@ -1738,7 +1738,7 @@ if decoder_name == "raw": if args == (): - args = mode, 0, -1 + args = mode, 0, 1 if args[0] in _MAPMODES: im = new(mode, (1,1)) im = im._new( Sorry to make a fuss about this if there is a rationale for the difference between fromstring() and frombuffer(). Thanks very much, Dan From pete at shinners.org Fri Jul 7 08:27:51 2006 From: pete at shinners.org (Pete Shinners) Date: Fri, 7 Jul 2006 06:27:51 +0000 (UTC) Subject: [Image-SIG] Quicker image transfer, tobuffer? Message-ID: It looks like the Pygame will soon be wanting quicker methods for sharing image data than the traditional tostring/fromstring. Both PIL and Pygame now have a "frombuffer" command, which speeds up this transaction by avoiding one of the two copies of pixel data. We're explorating the idea of "tobuffer" communication, that would allow copy-free transfer of images between libraries. We're pushing much more of our library to ctypes. This is a Google Summer of Code project, and we have already succeeded at getting a PIL Image tostring mapped into the SDL_Surface structure without any C code on our side. Moving more of the Pygame library to Python/ctypes has us looking to lean on outside libraries for the heavy drawing and filtering work. If we could get a data pointer to the pixel data into Python we could perform the zero copy image transfer with no C extension. Obviously there are potential issues when two image libraries are mapping to the same pixel data. On the SDL side we have the advantage that the SDL_Surface structures understand the concept of not "owning" the pixel data. It's been awhile since I looked at the python Buffer object API. Would there be any direct problems providing a Image.tobuffer() call to match tostring()? The other option could be to rely on ctypes to return a ctypes.c_ubytes_Array back to pythonspace. I believe we could have just as good results with the array data type already including in the python standard lib. Obviously we will benefit from the same sort of techniques going back and forth with the PyopenGL libraries, but I thought it would be smart to start the process with PIL. From fredrik at pythonware.com Fri Jul 7 11:17:37 2006 From: fredrik at pythonware.com (Fredrik Lundh) Date: Fri, 07 Jul 2006 11:17:37 +0200 Subject: [Image-SIG] frombuffer defaults to flip of fromstring? In-Reply-To: References: Message-ID: Dan Torop wrote: > I was curious whether there was a bug in the default behavior of > Image.frombuffer(). sure looks like a bug. http://effbot.python-hosting.com/ticket/54 > Sorry to make a fuss about this if there is a rationale for the > difference between fromstring() and frombuffer(). cannot see what that would be. I'll investigate. thanks /F From gwidion at mpc.com.br Mon Jul 10 08:17:19 2006 From: gwidion at mpc.com.br (Joao S. O. Bueno Calligaris) Date: Mon, 10 Jul 2006 03:17:19 -0300 Subject: [Image-SIG] Web button creator script with PIL. Message-ID: <200607100317.20942.gwidion@mpc.com.br> Hi, I just made this script wover the weekend, and would like to share it with you. Instead of writing once more what it is about, I will just paste the docstring bellow. :-) Download from: http://www.pion.com.br/~gwidion/python/dynabutton-1.2.tar.gz WHat it can do can be seen here: http://www.pion.com.br/~gwidion/python/dynabutton_example.png Regards, JS -><- The documentation: """ This program is Free Software - see the file LICENSE for details Dynabutton creates dinamic buttons for WEB or other UIs in real time. Copyright 2006 - Jo?o S. O. Bueno Calligaris It can be used either from command line, or as a cgi program. The accepted parameters are: button_filename = DEFAULT_BUTTON, button_text = "OK", font_file = "VeraSeBd.ttf", font_size = 18, text_color = (255, 255, 255), use_shadow = True, shadow_color = (0, 0, 0, 192), fuzzy_shadow = None, shadow_offset = 1, width = None, height = None, left_width = None, right_width = None, center_slice = None, align = CENTER button_filename - The filename on the server side which contains a template to the button that will be used. The program uses the left and right endings of this template as the button caps and copies/replicates the middle section. Over this middle section, it renders the button text button_text - The button text per se. Use utf-8 encoding font_file - the font file (currently ttf files only) on the server side which contains the font to be used to render the text. font_size - the font size, in pixels text_color - The color to render the text. An optional 4 number as alpha is accepted use_shadow - Whether to render or not a shadow for the text shadow_color - the color for the shadow fuzzy_shadow - Whether to blur the rendered shadow or not. shadow_offset - shadow offset in both x and y directions relative to the text. width - Button width in pixels. Automatic if not specified. height - Button height in pixels. Equal to the one of the button template image, if not specified left_width - Instead of taking the template's entire left half as button cap, use this many pixels. The remaining pixel columns up to the ones that make up the right button cap will be replicated/ resized as needed to create the middle section. right_width - The same as left_width, but for the right button cap center_slice - Explicit slice of pixel columns on the image template that will be replicated as the button center. If not specified, it it is auto computed from the left_width and right_width values. (NB, if those are also empty, the central pixel column is just stretched over to make for the central button area) align = Text alignment. Allowed values= LEFT, CENTER, RIGHT (v.1.2, not implemented for command line mode - use 0,1 or 2 for now) when used as cgi, the extra parameter "image_type" specifies which image type will be generated. From the command line, the first parameter is the output file name, and file_type is based on its extension. ex.: "png", "jpeg", "gif" - Example of CGI usage: Teste: The various parameters are encoded in the src url! Example for command line usage: ./dynabutton.py crewind.png cloud.png REWIND text_color:0,0,0 left_width:15 right_width:15 display The extra "display" parameters attempts to show the result on the screen. Python imaging library uses the 'xv' app by default to that. You can symbolic link another app to xv if you prefer. """ From Chris.Barker at noaa.gov Tue Jul 11 02:09:41 2006 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Mon, 10 Jul 2006 17:09:41 -0700 Subject: [Image-SIG] Quicker image transfer, tobuffer? In-Reply-To: References: Message-ID: <44B2EC45.8020402@noaa.gov> Pete Shinners wrote: > It looks like the Pygame will soon be wanting quicker methods for sharing image > data than the traditional tostring/fromstring. Both PIL and Pygame now have a > "frombuffer" command, which speeds up this transaction by avoiding one of the > two copies of pixel data. This is crying out to be a use for the new "array interface" proposed (and used) by numpy: http://numeric.scipy.org/array_interface.html Essentially, the idea is similar to a buffer, but with more information carried along with it. Rather than an arbitrary array of bytes, the interface provides a pointer to the data, and also information about the size, layout and type of the data. The goal of the numpy team is to get this integrated into the python standard library, so that any package that deals with arrays of data can communicate easily with other such packages. There are a lot of folks already transferring data back and forth between numpy arrays, PIL images, PyGame, OpenGL, wxPython, etc. It would be a really great thing to get a few more packages sharing the same protocol. Please join the numpy team in this, it will really benefit the Python community to have one way of exchanging this kind of data. -Chris -- Christopher Barker, Ph.D. Oceanographer NOAA/OR&R/HAZMAT (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker at noaa.gov From pete at shinners.org Tue Jul 11 06:00:05 2006 From: pete at shinners.org (Pete Shinners) Date: Tue, 11 Jul 2006 04:00:05 +0000 (UTC) Subject: [Image-SIG] Quicker image transfer, tobuffer? References: <44B2EC45.8020402@noaa.gov> Message-ID: Christopher Barker noaa.gov> writes: > This is crying out to be a use for the new "array interface" proposed > (and used) by numpy: > > http://numeric.scipy.org/array_interface.html Yeah, this would be an ideal solution. I hope more of the base array stuff can get into Python 2.6. We did look at the array proposal, but haven't been able to jump on it yet because of adoption. I guess it needs another package or two to get the ball rolling. From fredrik at pythonware.com Tue Jul 11 08:56:14 2006 From: fredrik at pythonware.com (Fredrik Lundh) Date: Tue, 11 Jul 2006 08:56:14 +0200 Subject: [Image-SIG] Quicker image transfer, tobuffer? In-Reply-To: <44B2EC45.8020402@noaa.gov> References: <44B2EC45.8020402@noaa.gov> Message-ID: Christopher Barker wrote: > This is crying out to be a use for the new "array interface" proposed > (and used) by numpy: > > http://numeric.scipy.org/array_interface.html > > Essentially, the idea is similar to a buffer, but with more information > carried along with it. Rather than an arbitrary array of bytes, the > interface provides a pointer to the data, and also information about the > size, layout and type of the data. unfortunately, the "array interface" model isn't even close to be able to describe a PIL image memory (the "Imaging" structure)... is the __array_struct__ CObject thing new, btw? From Chris.Barker at noaa.gov Tue Jul 11 19:43:18 2006 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Tue, 11 Jul 2006 10:43:18 -0700 Subject: [Image-SIG] Quicker image transfer, tobuffer? In-Reply-To: References: <44B2EC45.8020402@noaa.gov> Message-ID: <44B3E336.9070600@noaa.gov> Pete Shinners wrote: > Christopher Barker noaa.gov> writes: >> http://numeric.scipy.org/array_interface.html > Yeah, this would be an ideal solution. I hope more of the base array stuff can > get into Python 2.6. > We did look at the array proposal, but haven't been able to jump on it yet > because of adoption. I guess it needs another package or two to get the ball > rolling. Well, it would be nice if PyGame and PIL were that those packages. wxPython will be using it before to long -- I"m going to write the code for that if no one beats me to it. It doesn't need to be in the standard library to use it, it's not much to include with your source. Fredrik Lundh wrote: > unfortunately, the "array interface" model isn't even close to be able > to describe a PIL image memory (the "Imaging" structure)... Well Darn. Why not? Please, please, please send a note about this to the numpy list. It's certainly a goal that it be able represent image data as well as numerical data. > is the __array_struct__ CObject thing new, btw? I don't think so, but it has changed. I'm an advocate, beause I want to use it, but I'm not an expert on it by any means. -CHB -- Christopher Barker, Ph.D. Oceanographer NOAA/OR&R/HAZMAT (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker at noaa.gov From mmt at cs.ubc.ca Tue Jul 11 20:32:58 2006 From: mmt at cs.ubc.ca (Matthew Trentacoste) Date: Tue, 11 Jul 2006 11:32:58 -0700 Subject: [Image-SIG] 3 channel float images Message-ID: <90775C03-A9BD-4B90-9BD7-20F085DDED2E@cs.ubc.ca> I do work with high dynamic range images and would like to see about extending PIL to support them. For those unfamiliar, the primary difference is that all the channels are floating point. I've more or less deconstructed the way that the importer/exporter code works, but wanted to check on what to do to be able to create images that contain 3 floating point channels. What all do I need to do? + Add an experimental mode? + Add a memory mapping? + Add a new case to storage.c? Any pointers and help would be greatly appreciated. Cheers Matt [ matthew m trentacoste mmt at cs.ubc.ca ] [ ] [ graduate student lead software developer ] [ university of british columbia brightside technologies ] [ http://www.cs.ubc.ca/~mmt http://brightsidetech.com ] [ +1 (604) 827-3979 +1 (604) 228-4624 ] From oliphant.travis at ieee.org Tue Jul 11 20:37:25 2006 From: oliphant.travis at ieee.org (Travis Oliphant) Date: Tue, 11 Jul 2006 12:37:25 -0600 Subject: [Image-SIG] Quicker image transfer, tobuffer? In-Reply-To: References: <44B2EC45.8020402@noaa.gov> Message-ID: Fredrik Lundh wrote: > Christopher Barker wrote: > > >>This is crying out to be a use for the new "array interface" proposed >>(and used) by numpy: >> >>http://numeric.scipy.org/array_interface.html >> >>Essentially, the idea is similar to a buffer, but with more information >>carried along with it. Rather than an arbitrary array of bytes, the >>interface provides a pointer to the data, and also information about the >>size, layout and type of the data. > > > unfortunately, the "array interface" model isn't even close to be able > to describe a PIL image memory (the "Imaging" structure)... > Is this because PIL images are basically "arrays of pointers" to data? Actually, the Python side of the interface should still work as long as the PIL objects support the Sequence Interface. Of course this is not really "sharing" memory and it's debatable whether the tostring approach is not better anyway in that case. Even in this case, the PIL could handle non-contiguous Images by internally performing a tostring and supplying the string as the __array_interface__['data'] member and setting the read-only flag so that the consumer knows they don't have the ability to change the actual data. There ought to be a way to at least make the conversion process automatic even if there is no way to "share memory" because of the different memory model concepts. On the other hand, it seems that some PIL images are "block memory based". Those that are "block memory" based should be easy to share memory with using the __array_struct__ approach. > is the __array_struct__ CObject thing new, btw? The __array_struct__ has been there since last summer (2005). It's the default way that the array packages share data with each other. Only PIL Images with the ->block member not NULL could be shared this way (but at least those could be shared). Perhaps together we could come up with ways that the data could be shared. For example, could the PIL be changed to support the block-memory approach that other packages use. What is the advantage of using an array of pointers to pointers over the block-memory approach? As we in the NumPy world push for some ability for Python 2.6 to understand arrays, the input of the PIL community would be useful. Best regards, -Travis Oliphant NumPy developer From oliphant.travis at ieee.org Tue Jul 11 21:37:15 2006 From: oliphant.travis at ieee.org (Travis Oliphant) Date: Tue, 11 Jul 2006 13:37:15 -0600 Subject: [Image-SIG] Quicker image transfer, tobuffer? In-Reply-To: References: <44B2EC45.8020402@noaa.gov> Message-ID: <44B3FDEB.1000909@ieee.org> Here is a simple approach to allowing the PIL to export the array interface. This allows NumPy to create a suitable array from a PIL image very easily: At the top of Image.py add the following if sys.byteorder == 'little': _ENDIAN = '<' else: _ENDIAN = '>' _MODE_CONV = { # official modes "1": ('|b1', None), "L": ('|u1', None), "I": ('%si4' % _ENDIAN, None), "F": ('%sf4' % _ENDIAN, None), "P": ('|u1', None), "RGB": ('|u1', 3), "RGBX": ('|u1', 4), "RGBA": ('|u1', 4), "CMYK": ('|u1', 4), "YCbCr": ('|u1', 4), # Experimental modes include I;16, I;16B, RGBa, BGR;15, # and BGR;24. Use these modes only if you know exactly # what you're doing... } def _conv_type_shape(im): shape = im.size typ, extra = _MODE_CONV[im.mode] if extra is None: return shape, typ shape += (extra,) return shape, typ In the Image class structure add def __get_array_interface__(self): new = {} shape, typestr = _conv_type_shape(self) new['shape'] = shape new['typestr'] = typestr new['data'] = self.tostring() return new __array_interface__ = property(__get_array_interface__, None, doc="array interface") With this addition you can then do import Image, numpy im = Image.open('lena.jpg') a = numpy.asarray(im) and you will get a suitable read-only array pointing to the string produced by tostring. This would be a nice thing to add to the PIL. -Travis Oliphant From oliphant.travis at ieee.org Tue Jul 11 21:38:17 2006 From: oliphant.travis at ieee.org (Travis Oliphant) Date: Tue, 11 Jul 2006 13:38:17 -0600 Subject: [Image-SIG] 3 channel float images In-Reply-To: <90775C03-A9BD-4B90-9BD7-20F085DDED2E@cs.ubc.ca> References: <90775C03-A9BD-4B90-9BD7-20F085DDED2E@cs.ubc.ca> Message-ID: Matthew Trentacoste wrote: > I do work with high dynamic range images and would like to see about > extending PIL to support them. For those unfamiliar, the primary > difference is that all the channels are floating point. > > I've more or less deconstructed the way that the importer/exporter > code works, but wanted to check on what to do to be able to create > images that contain 3 floating point channels. > > What all do I need to do? > + Add an experimental mode? > + Add a memory mapping? > + Add a new case to storage.c? > > Any pointers and help would be greatly appreciated. > Use NumPy for storage. Then you an use the scipy.ndimage module or scipy.signal module for image processing. -Travis From kevin at cazabon.com Tue Jul 11 22:10:29 2006 From: kevin at cazabon.com (kevin at cazabon.com) Date: Tue, 11 Jul 2006 22:10:29 +0200 Subject: [Image-SIG] Quicker image transfer, tobuffer? References: <44B2EC45.8020402@noaa.gov> <44B3FDEB.1000909@ieee.org> Message-ID: <013401c6a526$0eb5e5e0$650aa8c0@duallie> Although I'm not really up to speed on the array interface, accessing the pixel data in a PIL image isn't really that difficult in C/C++... the only challenge I would see (besides tracking the channels/padding correctly... trivial) would be getting the pointer into Python to pass it to NumPy. I've written a few modules in C that directly modify the PIL buffer data, with simple code such as attached (lines 186-214 show it clearly). (This is a module that does unsharp-masking and gaussian blur on PIL images... Fredrik is welcome to include this directly into the PIL library if he sees fit, for which I'll gladly remove ANY licensing restrictions) Kevin. ----- Original Message ----- From: "Travis Oliphant" To: Cc: "numpy-discussion" Sent: Tuesday, July 11, 2006 9:37 PM Subject: Re: [Image-SIG] Quicker image transfer, tobuffer? > > Here is a simple approach to allowing the PIL to export the array > interface. > > This allows NumPy to create a suitable array from a PIL image very easily: > > > At the top of Image.py add the following > > if sys.byteorder == 'little': > _ENDIAN = '<' > else: > _ENDIAN = '>' > > _MODE_CONV = { > > # official modes > "1": ('|b1', None), > "L": ('|u1', None), > "I": ('%si4' % _ENDIAN, None), > "F": ('%sf4' % _ENDIAN, None), > "P": ('|u1', None), > "RGB": ('|u1', 3), > "RGBX": ('|u1', 4), > "RGBA": ('|u1', 4), > "CMYK": ('|u1', 4), > "YCbCr": ('|u1', 4), > > # Experimental modes include I;16, I;16B, RGBa, BGR;15, > # and BGR;24. Use these modes only if you know exactly > # what you're doing... > > } > > def _conv_type_shape(im): > shape = im.size > typ, extra = _MODE_CONV[im.mode] > if extra is None: > return shape, typ > shape += (extra,) > return shape, typ > > > > In the Image class structure add > > def __get_array_interface__(self): > new = {} > shape, typestr = _conv_type_shape(self) > new['shape'] = shape > new['typestr'] = typestr > new['data'] = self.tostring() > return new > > __array_interface__ = property(__get_array_interface__, None, > doc="array interface") > > > > With this addition you can then do > > import Image, numpy > > im = Image.open('lena.jpg') > a = numpy.asarray(im) > > and you will get a suitable read-only array pointing to the string > produced by tostring. > > > This would be a nice thing to add to the PIL. > > -Travis Oliphant > > > _______________________________________________ > Image-SIG maillist - Image-SIG at python.org > http://mail.python.org/mailman/listinfo/image-sig > -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: PILusm.cpp Url: http://mail.python.org/pipermail/image-sig/attachments/20060711/7ee6bd58/attachment-0001.pot From mmt at cs.ubc.ca Wed Jul 12 01:07:01 2006 From: mmt at cs.ubc.ca (Matthew Trentacoste) Date: Tue, 11 Jul 2006 16:07:01 -0700 Subject: [Image-SIG] 3 channel float images In-Reply-To: References: <90775C03-A9BD-4B90-9BD7-20F085DDED2E@cs.ubc.ca> Message-ID: Sounds good. Those modules look quite useful and I could easily accomplish most of what I was looking to. However, I was planning on contributing codecs for the various file formats that I would be reading and writing. I figured those would find a better home in PIL, then just convert the image data to a numpy array. Thoughts on that? Thanks On 11-Jul-06, at 12:38 PM, Travis Oliphant wrote: > Use NumPy for storage. Then you an use the scipy.ndimage module or > scipy.signal module for image processing. From arnd.baecker at web.de Wed Jul 12 07:47:46 2006 From: arnd.baecker at web.de (Arnd Baecker) Date: Wed, 12 Jul 2006 07:47:46 +0200 (CEST) Subject: [Image-SIG] Quicker image transfer, tobuffer? In-Reply-To: <44B3E336.9070600@noaa.gov> References: <44B2EC45.8020402@noaa.gov> <44B3E336.9070600@noaa.gov> Message-ID: On Tue, 11 Jul 2006, Christopher Barker wrote: > Pete Shinners wrote: > > Christopher Barker noaa.gov> writes: > > >> http://numeric.scipy.org/array_interface.html > > > Yeah, this would be an ideal solution. I hope more of the base array stuff can > > get into Python 2.6. > > > We did look at the array proposal, but haven't been able to jump on it yet > > because of adoption. I guess it needs another package or two to get the ball > > rolling. > > Well, it would be nice if PyGame and PIL were that those packages. > wxPython will be using it before to long -- I"m going to write the code > for that if no one beats me to it. That would be brilliant - I have been using numpy for a while now (and Numeric for a bit longer ;-) and we also use wxPython a lot in our research code demonstrations. Therefore a fast and simple exchange between numpy and wxpython is *very* much appreciated! In the same spirit: I also use PIL quite a lot, so a fast transfer of data from/to numpy arrays to/from PIL images would be great! Just some end-users cents ;-), Many thanks, Arnd From tier at inbox.ru Wed Jul 12 20:52:23 2006 From: tier at inbox.ru (Roman Petrichev) Date: Wed, 12 Jul 2006 22:52:23 +0400 Subject: [Image-SIG] convert in memory jpg to bmp Message-ID: <44B544E7.4040604@inbox.ru> Hi. I've got such the problem. I have a function processing bmp images given to it as a parameter. For example: img_data = open('1.bmp').read() result = my_func(img_data) it works fine. The point is how to do the same with a jpg image. my_func works only with bmp data. So I've to convert file into bmp. From PIL doc I got to know how to do this, but I don't want to save file into bmp image - I want to have bmp data in memory. How can I do this? Thanks. From fredrik at pythonware.com Wed Jul 12 23:18:44 2006 From: fredrik at pythonware.com (Fredrik Lundh) Date: Wed, 12 Jul 2006 23:18:44 +0200 Subject: [Image-SIG] convert in memory jpg to bmp In-Reply-To: <44B544E7.4040604@inbox.ru> References: <44B544E7.4040604@inbox.ru> Message-ID: Roman Petrichev wrote: > I've got such the problem. I have a function processing bmp images given > to it as a parameter. For example: > > img_data = open('1.bmp').read() > result = my_func(img_data) > > it works fine. The point is how to do the same with a jpg image. my_func > works only with bmp data. So I've to convert file into bmp. From PIL doc > I got to know how to do this, but I don't want to save file into bmp > image - I want to have bmp data in memory. > How can I do this? open the image as usual, and save it to a StringIO object: http://docs.python.org/lib/module-StringIO.html e.g. im = Image.open('1.jpg') f = StringIO.StringIO() im.save(f, "BMP") result = my_func(f.getvalue()) From oliphant.travis at ieee.org Thu Jul 13 00:41:42 2006 From: oliphant.travis at ieee.org (Travis E. Oliphant) Date: Wed, 12 Jul 2006 16:41:42 -0600 Subject: [Image-SIG] Patch to add array interface support to PIL Message-ID: The attached patch is against SVN version of PIL (Image.py in particular) that makes the Image object support the array interface Added: fromarray(obj) returns an image from an object exporting the array interface __array_interface__ : property returning the array_interface dictionary so that a PIL image can be understood as an array. It would be great if this patch got into PIL 1.1.6 -Travis -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: pil_patch_against_358.txt Url: http://mail.python.org/pipermail/image-sig/attachments/20060712/afda3c51/attachment.txt From fredrik at pythonware.com Thu Jul 13 11:29:36 2006 From: fredrik at pythonware.com (Fredrik Lundh) Date: Thu, 13 Jul 2006 11:29:36 +0200 Subject: [Image-SIG] Patch to add array interface support to PIL References: Message-ID: Travis E. Oliphant wrote: > The attached patch is against SVN version of PIL (Image.py in > particular) that makes the Image object support the array interface > > Added: > > fromarray(obj) returns an image from an object > exporting the array interface > > __array_interface__ : property returning the array_interface > dictionary so that a PIL image can > be understood as an array. > > It would be great if this patch got into PIL 1.1.6 +1 from me ;-) From schorsch at schorsch.com Thu Jul 13 12:49:22 2006 From: schorsch at schorsch.com (Georg Mischler) Date: Thu, 13 Jul 2006 06:49:22 -0400 (EDT) Subject: [Image-SIG] 3 channel float images In-Reply-To: <90775C03-A9BD-4B90-9BD7-20F085DDED2E@cs.ubc.ca> References: <90775C03-A9BD-4B90-9BD7-20F085DDED2E@cs.ubc.ca> Message-ID: Matthew Trentacoste wrote: > I do work with high dynamic range images and would like to see about > extending PIL to support them. For those unfamiliar, the primary > difference is that all the channels are floating point. > > I've more or less deconstructed the way that the importer/exporter > code works, but wanted to check on what to do to be able to create > images that contain 3 floating point channels. > > What all do I need to do? > + Add an experimental mode? > + Add a memory mapping? > + Add a new case to storage.c? > > Any pointers and help would be greatly appreciated. Hi Matt, You might want to have a look at this: http://starship.python.net/crew/schorsch/pilray.html It's very old (PIL 1.0) and probably not very pretty, but it worked for what I needed at the time. I had to create a custom RGBf mode because the existing F mode is single channel. If you should happen to work with the Radiance image format, then you could use my import/export code, probably with very little change. I would be happy to contribute that to the official PIL release, if Fredrik wants it. I also experimented a bit with storing the data the same way Radiance does (RGBE: four ints, the mantissa of each RGB channel and a common exponent), which would save a lot of space at a slight computational expense. I don't remember why I didn't continue into that direction. My attempts at tonemapping for converting into other image formats are probably the ugliest part of the package. I used some code taken from Radiance, which was even less modular at the time than it is today. I think it is also easier to write extensions to PIL with newer versions, but haven't checked the details yet. In any case, this may be the part where you need to invest the most thought and effort to get something better than I did. Good luck! -schorsch -- Georg Mischler -- simulations developer -- schorsch at schorsch com +schorsch.com+ -- lighting design tools -- http://www.schorsch.com/ From fredrik at pythonware.com Thu Jul 13 15:09:28 2006 From: fredrik at pythonware.com (Fredrik Lundh) Date: Thu, 13 Jul 2006 15:09:28 +0200 Subject: [Image-SIG] 3 channel float images References: <90775C03-A9BD-4B90-9BD7-20F085DDED2E@cs.ubc.ca> Message-ID: Matthew Trentacoste wrote: >I do work with high dynamic range images and would like to see about > extending PIL to support them. For those unfamiliar, the primary > difference is that all the channels are floating point. > > I've more or less deconstructed the way that the importer/exporter > code works, but wanted to check on what to do to be able to create > images that contain 3 floating point channels. > > What all do I need to do? > + Add an experimental mode? > + Add a memory mapping? > + Add a new case to storage.c? > > Any pointers and help would be greatly appreciated. PIL's internal storage model only supports one and four-byte pixels well, and fixing that isn't trivial (it's on my list for the "PIL version beyond 1.1.6" project, though; that release will use a much more flexible storage model). if I were you, I'd fake it, using a container class that holds three ordinary F images, or a single width*3 image. From schorsch at schorsch.com Thu Jul 13 18:43:32 2006 From: schorsch at schorsch.com (Georg Mischler) Date: Thu, 13 Jul 2006 12:43:32 -0400 (EDT) Subject: [Image-SIG] 3 channel float images In-Reply-To: References: <90775C03-A9BD-4B90-9BD7-20F085DDED2E@cs.ubc.ca> Message-ID: Georg Mischler wrote: > I also experimented a bit with storing the data the same way > Radiance does (RGBE: four ints, the mantissa of each RGB channel > and a common exponent), which would save a lot of space at a > slight computational expense. I don't remember why I didn't > continue into that direction. On checking, I just realized that my memory was faulty in more than one sense. My code actually stores RGBE values, and decodes just where necessary (eg. in getpixel() etc.). This has the advantage that it circumvents the storage issues Fredrik mentioned (whichever those actually are), and that it uses only a third of the memory. It has the disadvantage that some of the internal filtering operations won't give the expected result. You can't interpolate by just taking averages, for example, because the exponent needs to be treated differently. All operations that just copy pixels around will work fine, though. -schorsch -- Georg Mischler -- simulations developer -- schorsch at schorsch com +schorsch.com+ -- lighting design tools -- http://www.schorsch.com/ From thomas at eforms.co.nz Fri Jul 14 07:31:07 2006 From: thomas at eforms.co.nz (Thomas) Date: Fri, 14 Jul 2006 17:31:07 +1200 Subject: [Image-SIG] installing PIL error with gcc Message-ID: Hi All, I Am trying to install PIL on my mac 10.3 . I have trouble building . it complained about missing gcc so I downloaded xcode_legacy_7k594_0611959.dmg and installed the gcc3.1.pkg. created a sym link for gcc3 to gcc now I am getting the following error Fred-Daggs-Computer:~/Desktop/Imaging-1.1.5 freddagg$ python setup.py install running install running build running build_py running build_ext building '_imaging' extension gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd -fno-common -dynamic -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -DHAVE_LIBZ -DWORDS_BIGENDIAN -IlibImaging -I/sw/include -I/usr/local/include -I/usr/include -I/System/Library/Frameworks/Python.framework/Versions/2.3/include/ python2.3 -c libImaging/LzwDecode.c -o build/temp.darwin-7.3.1-Power_Macintosh-2.3/libImaging/LzwDecode.o In file included from libImaging/Imaging.h:14, from libImaging/LzwDecode.c:31: libImaging/ImPlatform.h:10: Python.h: No such file or directory libImaging/ImPlatform.h:14: #error Sorry, this library requires support for ANSI prototypes. libImaging/ImPlatform.h:17: #error Sorry, this library requires ANSI header files. libImaging/ImPlatform.h:55: #error Cannot find required 32-bit integer type libImaging/LzwDecode.c:33: stdio.h: No such file or directory libImaging/LzwDecode.c:34: stdlib.h: No such file or directory error: command 'gcc' failed with exit status 1 I also tried gcc2 on my machine to get similar results Thanks Thomas -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 1603 bytes Desc: not available Url : http://mail.python.org/pipermail/image-sig/attachments/20060714/ecefec09/attachment.bin From fredrik at pythonware.com Fri Jul 14 12:03:41 2006 From: fredrik at pythonware.com (Fredrik Lundh) Date: Fri, 14 Jul 2006 12:03:41 +0200 Subject: [Image-SIG] installing PIL error with gcc References: Message-ID: "Thomas" wrote: > libImaging/ImPlatform.h:10: Python.h: No such file or directory > libImaging/ImPlatform.h:14: #error Sorry, this library requires support > for ANSI prototypes. > libImaging/ImPlatform.h:17: #error Sorry, this library requires ANSI > header files. > libImaging/ImPlatform.h:55: #error Cannot find required 32-bit integer > type > libImaging/LzwDecode.c:33: stdio.h: No such file or directory > libImaging/LzwDecode.c:34: stdlib.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > I also tried gcc2 on my machine to get similar results to be able to compile C programs, you need a lot more than just the compiler binaries. any reason you cannot just use a prebuilt PIL version for your platform ? http://pythonmac.org/packages/ (also see http://www.python.org/download/mac/ ) From Chris.Barker at noaa.gov Fri Jul 14 21:56:58 2006 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Fri, 14 Jul 2006 12:56:58 -0700 Subject: [Image-SIG] installing PIL error with gcc In-Reply-To: References: Message-ID: <44B7F70A.6060306@noaa.gov> Fredrik Lundh wrote: > to be able to compile C programs, you need a lot more than just the compiler > binaries. > > any reason you cannot just use a prebuilt PIL version for your platform ? > > http://pythonmac.org/packages/ and if you really do need to build it yourself, download and install ALL of XCode tools (or Developer Tools, or whatever they call it for 10.3) That way you know you'll get everything you need. -Chris -- Christopher Barker, Ph.D. Oceanographer NOAA/OR&R/HAZMAT (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker at noaa.gov From bob at redivi.com Fri Jul 14 19:24:15 2006 From: bob at redivi.com (Bob Ippolito) Date: Fri, 14 Jul 2006 10:24:15 -0700 Subject: [Image-SIG] installing PIL error with gcc In-Reply-To: References: Message-ID: <6B5B0472-0747-4086-9594-CE30B73DE9E1@redivi.com> On Jul 13, 2006, at 10:31 PM, Thomas wrote: > I Am trying to install PIL on my mac 10.3 . I have trouble building . > it complained about missing gcc so I downloaded > xcode_legacy_7k594_0611959.dmg and installed the gcc3.1.pkg. > created a sym link for gcc3 to gcc You should just be running the normal Xcode installer, not messing with individual packages. You definitely shouldn't be creating symlinks. > libImaging/ImPlatform.h:10: Python.h: No such file or directory > libImaging/ImPlatform.h:14: #error Sorry, this library requires > support for ANSI prototypes. > libImaging/ImPlatform.h:17: #error Sorry, this library requires > ANSI header files. > libImaging/ImPlatform.h:55: #error Cannot find required 32-bit > integer type > libImaging/LzwDecode.c:33: stdio.h: No such file or directory > libImaging/LzwDecode.c:34: stdlib.h: No such file or directory > error: command 'gcc' failed with exit status 1 This means you didn't install Xcode properly. You don't have ANY headers! -bob -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/image-sig/attachments/20060714/ddfa2c0c/attachment.htm From medhat_assaad at yahoo.com Sat Jul 15 04:25:55 2006 From: medhat_assaad at yahoo.com (Medhat Assaad) Date: Fri, 14 Jul 2006 19:25:55 -0700 (PDT) Subject: [Image-SIG] Converting from RGB to CMYK--Help! Message-ID: <20060715022555.66247.qmail@web35611.mail.mud.yahoo.com> Hi, I am trying to convert an image from RGB to CMYK, so to test that I have this very small snippet of code: ----%------- import Image from sys import argv if __name__=='__main__': if len(argv)==3: Image.open(argv[1]).convert('CMYK').save(argv[2]) ----%------- When I test this with an RGB png input (and save the output to a jpg file), I just get a black image as output. (I am using PIL 1.1.5 on Windows with Python 2.4.2) To make sure that it is not a problem I am having with "displaying" the cmyk file, I converted it back to rgb... and the rgb output was still black. Am I missing something?! -- Thanks for any help you can provide, Medhat --------------------------------- How low will we go? Check out Yahoo! Messenger?s low PC-to-Phone call rates. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/image-sig/attachments/20060714/6428e749/attachment.html From thomas at eforms.co.nz Sun Jul 16 23:18:31 2006 From: thomas at eforms.co.nz (Thomas Thomas) Date: Mon, 17 Jul 2006 09:18:31 +1200 Subject: [Image-SIG] installing PIL error with gcc Message-ID: <005401c6a91d$66129f40$346ea8c0@tintz.co.nz> Thanks Fredrik , Thats all I needed . I didn't know that a prebuilt version was available for mac. when I go to http://www.pythonware.com/products/pil/ all I can see exe for windows and source downloads for rest of the platforms. I guess it will be good idea to give a link to http://pythonmac.org/packages/ Thank you Thomas ----------------------------------------------------- Thomas Thomas phone +64 7 855 8478 fax +64 7 855 8871 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/image-sig/attachments/20060717/b2953f6f/attachment.htm From fredrik at pythonware.com Mon Jul 17 17:12:35 2006 From: fredrik at pythonware.com (Fredrik Lundh) Date: Mon, 17 Jul 2006 17:12:35 +0200 Subject: [Image-SIG] Converting from RGB to CMYK--Help! In-Reply-To: <20060715022555.66247.qmail@web35611.mail.mud.yahoo.com> References: <20060715022555.66247.qmail@web35611.mail.mud.yahoo.com> Message-ID: Medhat Assaad wrote: > I am trying to convert an image from RGB to CMYK, so to test that I have > this very small snippet of code: > > ----%------- > import Image > from sys import argv > > if __name__=='__main__': > if len(argv)==3: > Image.open(argv[1]).convert('CMYK').save(argv[2]) > ----%------- > > When I test this with an RGB png input (and save the output to a jpg > file), I just get a black image as output. (I am using PIL 1.1.5 on > Windows with Python 2.4.2) > > To make sure that it is not a problem I am having with "displaying" the > cmyk file, I converted it back to rgb... and the rgb output was still > black. > > Am I missing something?! search the mailing list archives for a thread titled "Problem with JPEG and CMYK color space", which provides some background and a workaround. alternatively, upgrade to 1.1.6 beta. From kemmerling at gmx.at Thu Jul 20 18:30:21 2006 From: kemmerling at gmx.at (Markus Kemmerling) Date: Thu, 20 Jul 2006 18:30:21 +0200 Subject: [Image-SIG] dpi read/write support in TiffImagePlugin broken Message-ID: It seems to me that the dpi read/write support in TiffImagePlugin.py is broken. When reading an image it will set the dpi in the info dictionary only if RESOLUTION_UNIT == 1. Similarly it will set RESOLUTION_UNIT to 1when saving an image as a TIFF with dpi values given. But according to the TIFF specification (http://partners.adobe.com/ public/developer/en/tiff/TIFF6.pdf) this value should be 2 rather than 1: ResolutionUnit Tag = 296 (128.H) Type = SHORT Values: 1 = No absolute unit of measurement. Used for images that may have a non-square aspect ratio but no meaningful absolute dimensions. 2 = Inch. 3 = Centimeter. Default = 2 (inch). After applying the following patch (in analogy to the dpi-related code in PngImagePlugin.py) to TiffImagePlugin.py (current PIL version 1.1.6b1) the results are consistent with the specification. I tested this by comparing the dpi and size values in Photoshop and GraphicConverter. --- TiffImagePlugin.py.orig 2006-02-13 00:43:27.000000000 +0100 +++ TiffImagePlugin.py 2006-07-20 17:47:28.000000000 +0200 @@ -574,10 +574,16 @@ xdpi = getscalar(X_RESOLUTION, (1, 1)) ydpi = getscalar(Y_RESOLUTION, (1, 1)) - if xdpi and ydpi and getscalar(RESOLUTION_UNIT, 1) == 1: + if xdpi and ydpi: xdpi = xdpi[0] / (xdpi[1] or 1) ydpi = ydpi[0] / (ydpi[1] or 1) - self.info["dpi"] = xdpi, ydpi + unit = getscalar(RESOLUTION_UNIT, 1) + if unit == 1: + self.info["aspect"] = xdpi, ydpi + elif unit == 2: + self.info["dpi"] = xdpi, ydpi + elif unit == 3: + self.info["dpi"] = (xdpi*.39370079, ydpi*.39370079) # build tile descriptors x = y = l = 0 @@ -715,7 +721,7 @@ dpi = im.encoderinfo.get("dpi") if dpi: - ifd[RESOLUTION_UNIT] = 1 + ifd[RESOLUTION_UNIT] = 2 ifd[X_RESOLUTION] = _cvt_res(dpi[0]) ifd[Y_RESOLUTION] = _cvt_res(dpi[1]) Regards, Markus Kemmerling Medical University Vienna From tyson at fallingbullets.com Sun Jul 23 23:42:24 2006 From: tyson at fallingbullets.com (Tyson Tate) Date: Sun, 23 Jul 2006 14:42:24 -0700 Subject: [Image-SIG] Installing without root Message-ID: I'm trying to install PIL 1.1.5 on my shared hosting server (Bluehost) for use with Django (a Python web application framework). I ran setup.py with a custom prefix and it ran smoothly until it died on some Tk dependencies: --- # python setup.py install --prefix=~/python_libs [snip] ude -I/usr/include/python2.3 -c _imagingft.c -o build/temp.linux- i686-2.3/_imagingft.o gcc -pthread -shared build/temp.linux-i686-2.3/_imagingft.o -L/usr/ lib -lfreetype -o build/lib.linux-i686-2.3/_imagingft.so building '_imagingtk' extension creating build/temp.linux-i686-2.3/Tk gcc -pthread -fno-strict-aliasing -DNDEBUG -O2 -g -pipe -m32 - march=i386 -mtune=pentium4 -D_GNU_SOURCE -fPIC -fPIC -I/usr/include/ freetype2 -IlibImaging -I/usr/include -I/usr/include/python2.3 -c Tk/ tkImaging.c -o build/temp.linux-i686-2.3/Tk/tkImaging.o Tk/tkImaging.c:51:16: tk.h: No such file or directory Tk/tkImaging.c:73: error: syntax error before "clientdata" Tk/tkImaging.c: In function `PyImagingPhotoPut': Tk/tkImaging.c:77: error: `Tk_PhotoHandle' undeclared (first use in this function) [snip] --- It looks to me like it can't find the tkImaging headers. How might I be able to work around this or give it access to the headers? Thanks in advance, Tyson Tate -- Tyson Tate - CalPoly Graphic Design Student - Work: Graphic Designer (CalPoly Library) - Play: Mustang Band, CalPoly Triathlon Team, Kappa Kappa Psi (Iota Pi) From fredrik at pythonware.com Wed Jul 26 22:49:38 2006 From: fredrik at pythonware.com (Fredrik Lundh) Date: Wed, 26 Jul 2006 22:49:38 +0200 Subject: [Image-SIG] Installing without root In-Reply-To: References: Message-ID: Tyson Tate wrote: > I'm trying to install PIL 1.1.5 on my shared hosting server > (Bluehost) for use with Django (a Python web application framework). > > I ran setup.py with a custom prefix and it ran smoothly until it died > on some Tk dependencies: > > --- > # python setup.py install --prefix=~/python_libs > [snip] > ude -I/usr/include/python2.3 -c _imagingft.c -o build/temp.linux- > i686-2.3/_imagingft.o > gcc -pthread -shared build/temp.linux-i686-2.3/_imagingft.o -L/usr/ > lib -lfreetype -o build/lib.linux-i686-2.3/_imagingft.so > building '_imagingtk' extension > creating build/temp.linux-i686-2.3/Tk > gcc -pthread -fno-strict-aliasing -DNDEBUG -O2 -g -pipe -m32 - > march=i386 -mtune=pentium4 -D_GNU_SOURCE -fPIC -fPIC -I/usr/include/ > freetype2 -IlibImaging -I/usr/include -I/usr/include/python2.3 -c Tk/ > tkImaging.c -o build/temp.linux-i686-2.3/Tk/tkImaging.o > Tk/tkImaging.c:51:16: tk.h: No such file or directory > Tk/tkImaging.c:73: error: syntax error before "clientdata" > Tk/tkImaging.c: In function `PyImagingPhotoPut': > Tk/tkImaging.c:77: error: `Tk_PhotoHandle' undeclared (first use in > this function) > [snip] > --- > > It looks to me like it can't find the tkImaging headers. How might I > be able to work around this or give it access to the headers? the Python you're using is built with Tkinter, and PIL's setup.py script thought that it had found proper header files, but the compiler couldn't find them. since you won't need the Tk stuff for your web application, the easiest way to fix this is to trick the setup.py script into ignoring the Tkinter extension. look for this section in the setup.py file: try: import _tkinter except ImportError: _tkinter = None and change it to try: import _tkinter_is_not_important except ImportError: _tkinter = None (or something similar; the important thing here is to make sure that the _tkinter variable is set to None) From adminkoff at cox.net Wed Jul 19 01:46:01 2006 From: adminkoff at cox.net (Anthony D. Minkoff) Date: Tue, 18 Jul 2006 16:46:01 -0700 Subject: [Image-SIG] selftest.py fails (Mac OS X) Message-ID: Help! Anthony-Minkoffs-Computer:/Applications/MacPython 2.4/Extensions/ Imaging-1.1.5 adminkoff$ python setup.py build_ext -i running build_ext --- using frameworks at /Library/Frameworks -------------------------------------------------------------------- PIL 1.1.5 BUILD SUMMARY -------------------------------------------------------------------- version 1.1.5 platform darwin 2.4.3 (#1, Apr 7 2006, 10:54:33) [GCC 4.0.1 (Apple Computer, Inc. build 5250)] -------------------------------------------------------------------- --- TKINTER support ok --- JPEG support ok --- ZLIB (PNG/ZIP) support ok *** FREETYPE2 support not available -------------------------------------------------------------------- To add a missing option, make sure you have the required library, and set the corresponding ROOT variable in the setup.py script. To check the build, run the selftest.py script. Anthony-Minkoffs-Computer:/Applications/MacPython 2.4/Extensions/ Imaging-1.1.5 adminkoff$ python selftest.py ***************************************************************** Failure in example: _info(Image.open("Images/lena.jpg")) from line #24 of selftest.testimage Exception raised: Traceback (most recent call last): File "./doctest.py", line 499, in _run_examples_inner exec compile(source, "", "single") in globs File "", line 1, in ? File "./selftest.py", line 21, in _info im.load() File "PIL/ImageFile.py", line 180, in load d = Image._getdecoder(self.mode, d, a, self.decoderconfig) File "PIL/Image.py", line 328, in _getdecoder raise IOError("decoder %s not available" % decoder_name) IOError: decoder jpeg not available 1 items had failures: 1 of 55 in selftest.testimage ***Test Failed*** 1 failures. *** 1 tests of 55 failed. Anthony-Minkoffs-Computer:/Applications/MacPython 2.4/Extensions/ Imaging-1.1.5 adminkoff$ ? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/image-sig/attachments/20060718/cec48f58/attachment.html -------------- next part -------------- A non-text attachment was scrubbed... Name: pastedGraphic.png Type: image/png Size: 42915 bytes Desc: not available Url : http://mail.python.org/pipermail/image-sig/attachments/20060718/cec48f58/attachment-0001.png From JWang at fhsu.edu Wed Jul 19 23:37:35 2006 From: JWang at fhsu.edu (JWang at fhsu.edu) Date: Wed, 19 Jul 2006 16:37:35 -0500 Subject: [Image-SIG] tkinter problem Message-ID: Hi all, when I attempted to install Imaging-1.1.5 by python setup.py build_ext -i and found the following errors. I have installed tkinter-2.3.4 already. Does anyone know how to fix the problem? Thanks! ---------------------------------------------------------------- PIL 1.1.5 BUILD SUMMARY ---------------------------------------------------------------- *** TKINTER support not available (Tcl/Tk 8.3 libraries needed) --- JPEG support ok --- ZLIB (PNG/ZIP) support ok --- FREETYPE support ok ---------------------------------------------------------------- JW -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/image-sig/attachments/20060719/90774209/attachment.html From holread at glam.ac.uk Thu Jul 20 12:47:48 2006 From: holread at glam.ac.uk (Read H O L (Comp)) Date: Thu, 20 Jul 2006 11:47:48 +0100 Subject: [Image-SIG] Need help with PIL image & imagetk Message-ID: <0BA7EE4D4646E0409D458D347C508B783C80A9@MAILSERV1.uni.glam.ac.uk> Hi! Im trying to do something relatively simple, loading up an image file, resize it, then display it on a canvas. However, im getting some strange problems, namely (output from console): File "Geomap_0.0.2.py", line 57, in drawInitial bgimg = ImageTk.PhotoImage(img) File "/usr/local/lib/python2.4/site-packages/PIL/ImageTk.py", line 116, in __init__ self.paste(image) File "/usr/local/lib/python2.4/site-packages/PIL/ImageTk.py", line 181, in paste import _imagingtk ImportError: /usr/local/lib/python2.4/site-packages/PIL/_imagingtk.so: undefined symbol: Tk_PhotoPutBlock_NoComposite (Geomap_0.0.2.py is the program i am trying to create). Basicly Im doing the following: from PIL import Image, ImageTk img = Image.open('./files/map.gif') bgimg = ImageTk.PhotoImage(img) self.background = self.canvas.create_image(0,0,image=bgimg, anchor=NW) I havent event got as far as trying to resize the image, when the errors come up as above. If I do not use Image and ImageTk I can get the image to display on the canvas using PhotoImage, however, I cannot resize an image using PhotoImage alone (as far as i am aware), which I need to do. I read on another website that it may be down to my TK being out of date, I have downloaded the latest stable (8.4) versions of TCL and TK, compiled and installed them, but to no avail. Any ideas? I really need to be able to resize images! Is it possible to do with PhotoImage? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/image-sig/attachments/20060720/ef847e5f/attachment.htm From shane.maloney98 at gmail.com Tue Jul 25 18:21:48 2006 From: shane.maloney98 at gmail.com (Shane Maloney) Date: Tue, 25 Jul 2006 12:21:48 -0400 Subject: [Image-SIG] cant import PIL Message-ID: <9d404ef00607250921r37aabafva2035182b3b81478@mail.gmail.com> Have Active Python 2.4.3 install on a Mac Tiger server but when admin install the PIL library it works fine for them but not for other users i presume its a permission problem but not sure and help would be appreciated. Shane -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/image-sig/attachments/20060725/6486ebe8/attachment.html From fredrik at pythonware.com Thu Jul 27 09:36:25 2006 From: fredrik at pythonware.com (Fredrik Lundh) Date: Thu, 27 Jul 2006 09:36:25 +0200 Subject: [Image-SIG] Need help with PIL image & imagetk In-Reply-To: <0BA7EE4D4646E0409D458D347C508B783C80A9@MAILSERV1.uni.glam.ac.uk> References: <0BA7EE4D4646E0409D458D347C508B783C80A9@MAILSERV1.uni.glam.ac.uk> Message-ID: Read H O L (Comp) wrote: > Im trying to do something relatively simple, loading up an image file, > resize it, then display it on a canvas. However, im getting some strange > problems, namely (output from console): > > File "Geomap_0.0.2.py", line 57, in drawInitial > bgimg = ImageTk.PhotoImage(img) > File "/usr/local/lib/python2.4/site-packages/PIL/ImageTk.py", line 116, > in __init__ > self.paste(image) > File "/usr/local/lib/python2.4/site-packages/PIL/ImageTk.py", line 181, > in paste > import _imagingtk > ImportError: /usr/local/lib/python2.4/site-packages/PIL/_imagingtk.so: > undefined symbol: Tk_PhotoPutBlock_NoComposite this looks as a version mismatch: you get different (older) libraries at runtime compared to the ones you used when building PIL. if you're using a contemporary Linux version, try using the official builds for both Tk and PIL, if possible. (look for tk and python-imaging or pil in the official package repository) From fredrik at pythonware.com Thu Jul 27 09:38:21 2006 From: fredrik at pythonware.com (Fredrik Lundh) Date: Thu, 27 Jul 2006 09:38:21 +0200 Subject: [Image-SIG] tkinter problem In-Reply-To: References: Message-ID: JWang at fhsu.edu wrote: > when I attempted to install Imaging-1.1.5 by python setup.py build_ext > -i and found the following errors. I have installed tkinter-2.3.4 > already. Does anyone know how to fix the problem? Thanks! you need build files for Tcl and Tk 8.3. look for "tcl-devel" and "tk-devel" (or something similar) in the package repository for your distribution. > ---------------------------------------------------------------- > PIL 1.1.5 BUILD SUMMARY > ---------------------------------------------------------------- > *** TKINTER support not available (Tcl/Tk 8.3 libraries needed) > --- JPEG support ok > --- ZLIB (PNG/ZIP) support ok > --- FREETYPE support ok > ---------------------------------------------------------------- From fherdom at gmail.com Thu Jul 27 13:18:27 2006 From: fherdom at gmail.com (Felix Hdez) Date: Thu, 27 Jul 2006 12:18:27 +0100 Subject: [Image-SIG] Panorama images Message-ID: <6f1154240607270418k5173fb1csb777848e458e9841@mail.gmail.com> Hi! How can I make panoramas from python program? can i call routines from http://user.cs.tu-berlin.de/~nowozin/autopano-sift/, for example? Thanks, From William.T.Bridgman.1 at gsfc.nasa.gov Thu Jul 27 16:26:48 2006 From: William.T.Bridgman.1 at gsfc.nasa.gov (W.T. Bridgman) Date: Thu, 27 Jul 2006 10:26:48 -0400 Subject: [Image-SIG] PIL modules with pickle? Message-ID: <62880F5E-E31C-469F-9CFC-1352D2F65001@gsfc.nasa.gov> I've got a python class that I want to pickle but it includes calls to some PIL modules. The pickling process keeps failing with pickle.PicklingError: Can't pickle : it's not found as __main__.getsize Is there a way around this? I've searched ASPN recipes, Google, and tried to search the Image-SIG archive for comprehensible examples. I suspect something with __reduce__ or copy_reg may work examples I've found are far from clear. Thanks, Tom -- Dr. William T."Tom" Bridgman Scientific Visualization Studio Global Science & Technology, Inc. NASA/Goddard Space Flight Center Email: William.T.Bridgman.1 at gsfc.nasa.gov Code 610.3 Phone: 301-286-1346 Greenbelt, MD 20771 FAX: 301-286-1634 http://svs.gsfc.nasa.gov/ From michael.eckhoff at navy.mil Thu Jul 27 22:39:04 2006 From: michael.eckhoff at navy.mil (Eckhoff, Michael A CIV N62306) Date: Thu, 27 Jul 2006 15:39:04 -0500 Subject: [Image-SIG] Data visualization Message-ID: <649041DE1995F34D8F4221558314F12E1FCECE@NAEAMILLEX01VA.nadsusea.nads.navy.mil> I've been reading the book by Langtangen ("Python Scripting for Computational Science") in which I recall his mentioning PIL, although I cannot find any reference to it in his index. Has anyone used PIL to visualize the data in a Numpy array (or whatever the latest version is called)? Is it feasible to use the Image class for drawing vector fields, contours, etc. as in matlab? Is there a connection with matplotlib? I'd especially be interested if there are any oceanographers out there who are willing to share such Python applications. Thank you, Michael Eckhoff -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/image-sig/attachments/20060727/1b040a95/attachment.htm -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 4694 bytes Desc: not available Url : http://mail.python.org/pipermail/image-sig/attachments/20060727/1b040a95/attachment.bin From William.T.Bridgman.1 at gsfc.nasa.gov Fri Jul 28 13:48:44 2006 From: William.T.Bridgman.1 at gsfc.nasa.gov (W.T. Bridgman) Date: Fri, 28 Jul 2006 07:48:44 -0400 Subject: [Image-SIG] Data visualization In-Reply-To: References: Message-ID: I've used PIL for generating images from numarray/numpy. However, for plots, curves, and similar viz work, I've done some work with matplotlib or gnuplot-py when I needed interactivity. For publication-quality postscript graphics, I've had good results with PyX (pyx.sourceforge.net). Tom On Jul 28, 2006, at 6:00 AM, image-sig-request at python.org wrote: > From: "Eckhoff, Michael A CIV N62306" > Date: July 27, 2006 4:39:04 PM EDT > To: > Subject: [Image-SIG] Data visualization > > > I've been reading the book by Langtangen ("Python Scripting for > Computational Science") in which I recall his mentioning PIL, > although I cannot find any reference to it in his index. Has anyone > used PIL to visualize the data in a Numpy array (or whatever the > latest version is called)? Is it feasible to use the Image class > for drawing vector fields, contours, etc. as in matlab? Is there a > connection with matplotlib? > > I'd especially be interested if there are any oceanographers out > there who are willing to share such Python applications. > > Thank you, > Michael Eckhoff > -- Dr. William T."Tom" Bridgman Scientific Visualization Studio Global Science & Technology, Inc. NASA/Goddard Space Flight Center Email: William.T.Bridgman.1 at gsfc.nasa.gov Code 610.3 Phone: 301-286-1346 Greenbelt, MD 20771 FAX: 301-286-1634 http://svs.gsfc.nasa.gov/ From Chris.Barker at noaa.gov Fri Jul 28 18:53:09 2006 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Fri, 28 Jul 2006 09:53:09 -0700 Subject: [Image-SIG] Data visualization In-Reply-To: <649041DE1995F34D8F4221558314F12E1FCECE@NAEAMILLEX01VA.nadsusea.nads.navy.mil> References: <649041DE1995F34D8F4221558314F12E1FCECE@NAEAMILLEX01VA.nadsusea.nads.navy.mil> Message-ID: <44CA40F5.4030001@noaa.gov> Eckhoff, Michael A CIV N62306 wrote: > I've been reading the book by Langtangen ("Python Scripting for > Computational Science") in which I recall his mentioning PIL, > although I cannot find any reference to it in his index. Has anyone > used PIL to visualize the data in a Numpy array (or whatever the > latest version is called)? Is it feasible to use the Image class for > drawing vector fields, contours, etc. as in matlab? Is there a > connection with matplotlib? PIL only deals with images and basic drawing operations. It could be used as the basis for tool like that, but you'll have to rite a lot of code to do it. It also won't provide any interactivity. It has nothing to do with matplotlib > I'd especially be interested if there are any oceanographers out > there who are willing to share such Python applications. matplotlib is becoming the most common tool for scientific plotting. There is even a "basemap" add-on that provides plotting in projected coordinates (maps). There are at least a few Oceanographers on the matplotlib-users list. Enthought's Chaco is another option, but last I saw it only really works right on Windows. If you want something interactive in a GUI, you can use matplotlib, or, if you can use wxPython the wxPython FloatCanvas is another option (shameless plug -- I wrote it). Here's and example of what one user is doing with it: http://jehiah.com/archive/floatcanvas-wrapping-world-projection and http://jehiah.com/archive/drawing-windbarbs-in-floatcanvas -Chris -- Christopher Barker, Ph.D. Oceanographer NOAA/OR&R/HAZMAT (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker at noaa.gov From benarbe at TuckerEnergy.com Fri Jul 28 23:26:38 2006 From: benarbe at TuckerEnergy.com (Benjamin) Date: Fri, 28 Jul 2006 18:26:38 -0300 Subject: [Image-SIG] Group 4 TIFF Compression support Message-ID: <44CA810E.50104@TuckerEnergy.com> Hello: I'm using PIL and came across to work with tiff files.Then i saw a patch apparently written by V. Pastukhov. I downloaded the tarballs tiff-3.8.2.tar.gz and Imaging-1.1.5 i'm using Debian 3.3 sarge distribution with python 3.3, tcl/tk 8.4. Installation of tiff-3.8.2 went with no problems. But when i came to install Imaging, found that the following files were missing: ./Setup.in ./libImaging/ImConfig.h.in ./libImaging/ImConfig.h.win ./libImaging/Makefile.in ./libImaging/Makefile.win ./libImaging/Tiff.h ./libImaging/TiffDecode.c Even so, i decided to go on and apply the patch to the relevant files. Also the Tiff.h and TiffDecode.c were created from information in the patch. I did the following aditions to the ./Setup.py: -TCL_ROOT=None -TIFF_ROOT=None +TCL_ROOT=('/usr/lib','/usr/include') +TIFF_ROOT=('/usr/local/lib', '/home/hal/tarballs/tiff-3.8.2/libtiff') @line 257 libs=[] defs=[] + if feature.tiff: + libs.append(feature.tiff) + defs.append(("HAVE_LIBTIFF", None)) if feature.jpeg: .... Then i tried as a root: python setup.py install everything went fine, no errors, but when i run: python selftest.py I get: *** The _imaging C module is not installed I need help, what i'm doing wrong? I'll appreciate any help, thanks From anthonyu at killa.net Sat Jul 29 16:00:05 2006 From: anthonyu at killa.net (Anthony D. Urso) Date: Sat, 29 Jul 2006 07:00:05 -0700 Subject: [Image-SIG] ImageFilter.Kernel ignores two pixels of border Message-ID: <20060729140005.GY238@killa.net> Using PIL 1.1.5 under Python 2.4.3, filtering an image with a 5x5 ImageFilter.Kernel ignores two pixels of border. I understand why this happens, but it's really not the optimal behavior: generally, filters consider those undefined pixels outside the image to have zero values. Is there anyway to work around this without expanding, filtering, then cropping the image? Please Cc: me as I am not subscribed to this list. Cheers, Anthony -- Au PGP Key ID: 0x385B44CB Fingerprint: 9E9E B116 DB2C D734 C090 E72F 43A0 95C4 385B 44CB "Maximus vero fugiens a quodam Urso, milite Romano, interemptus est" - Getica 235 From daniel at roseman.org.uk Sat Jul 29 20:30:20 2006 From: daniel at roseman.org.uk (daniel at roseman.org.uk) Date: Sat, 29 Jul 2006 11:30:20 -0700 Subject: [Image-SIG] Truetype representation in Windows and Linux Message-ID: <27b46e7b1fdc3942319e8836326e1769@mail.roseman.org.uk> Hi, I'm using PIL to dynamically create graphical text headers for my website, using a truetype font. Testing this at home on my Windows box works fine. When I upload it to the Linux server, the fonts appear subtly different - the size of the overall image isn't quite right, and the text appears either squashed or spaced wrongly. Here's the relevant code: imf = ImageFont.truetype(fontfile, int(fontsize)) size = imf.getsize(header) im = Image.new("RGB", size, "white") draw = ImageDraw.Draw(im) draw.text((0, 0), header, font=imf, fill=colour) With fontfile and fontsize set to the relevant values, and using sample text "Randomtext", this produces an image of size 227x44 on Windows and 229x44 on Linux - doesn't sound like much, but the difference is clearly noticeable (and the designer will kill me). Both machines are running Python 2.4.2 and PIL 1.1.5. Any ideas, anyone? -- DR. From daniel at roseman.org.uk Sat Jul 29 21:31:08 2006 From: daniel at roseman.org.uk (daniel at roseman.org.uk) Date: Sat, 29 Jul 2006 12:31:08 -0700 Subject: [Image-SIG] Truetype representation in Windows and Linux In-Reply-To: <24332.217.116.100.229.1154199244.squirrel@mail.myfonts.com> References: <24332.217.116.100.229.1154199244.squirrel@mail.myfonts.com><24332.217.116.100.229.1154199244.squirrel@mail.myfonts.com> Message-ID: Thanks for the tip. Any clues on how to go about this? I'm actually using the FreeBSD ports (I lied about Linux) and I'm not really up to speed with building stuff. What would I need to run to fix this? Sorry about the newbie questions and thanks for any help. -- DR. On Sat, 29 Jul 2006 14:54:04 -0400 (EDT), "Adam Twardoch" wrote: > My guess is that on your Windows machine, FreeType (that is used to render > texts from PIL) is compiled with native TrueType hinting support enabled > while on Linux, you have FreeType without native TrueType hinting option. > You'd need to build FreeType with native TrueType hinting enabled to get > the same results as on Windows. > > A. > > >> Hi, >> >> I'm using PIL to dynamically create graphical text headers for my > website, >> using a truetype font. Testing this at home on my Windows box works > fine. >> When I upload it to the Linux server, the fonts appear subtly different > - >> the size of the overall image isn't quite right, and the text appears >> either squashed or spaced wrongly. >> >> Here's the relevant code: >> >> imf = ImageFont.truetype(fontfile, int(fontsize)) >> size = imf.getsize(header) >> im = Image.new("RGB", size, "white") >> draw = ImageDraw.Draw(im) >> draw.text((0, 0), header, font=imf, fill=colour) >> >> With fontfile and fontsize set to the relevant values, and using sample >> text "Randomtext", this produces an image of size 227x44 on Windows and >> 229x44 on Linux - doesn't sound like much, but the difference is clearly >> noticeable (and the designer will kill me). Both machines are running >> Python 2.4.2 and PIL 1.1.5. >> >> Any ideas, anyone? >> >> -- >> DR. >> >> _______________________________________________ >> Image-SIG maillist - Image-SIG at python.org >> http://mail.python.org/mailman/listinfo/image-sig >> From adam at twardoch.com Sat Jul 29 20:54:04 2006 From: adam at twardoch.com (Adam Twardoch) Date: Sat, 29 Jul 2006 14:54:04 -0400 (EDT) Subject: [Image-SIG] Truetype representation in Windows and Linux In-Reply-To: <27b46e7b1fdc3942319e8836326e1769@mail.roseman.org.uk> References: <27b46e7b1fdc3942319e8836326e1769@mail.roseman.org.uk> Message-ID: <24332.217.116.100.229.1154199244.squirrel@mail.myfonts.com> My guess is that on your Windows machine, FreeType (that is used to render texts from PIL) is compiled with native TrueType hinting support enabled while on Linux, you have FreeType without native TrueType hinting option. You'd need to build FreeType with native TrueType hinting enabled to get the same results as on Windows. A. > Hi, > > I'm using PIL to dynamically create graphical text headers for my website, > using a truetype font. Testing this at home on my Windows box works fine. > When I upload it to the Linux server, the fonts appear subtly different - > the size of the overall image isn't quite right, and the text appears > either squashed or spaced wrongly. > > Here's the relevant code: > > imf = ImageFont.truetype(fontfile, int(fontsize)) > size = imf.getsize(header) > im = Image.new("RGB", size, "white") > draw = ImageDraw.Draw(im) > draw.text((0, 0), header, font=imf, fill=colour) > > With fontfile and fontsize set to the relevant values, and using sample > text "Randomtext", this produces an image of size 227x44 on Windows and > 229x44 on Linux - doesn't sound like much, but the difference is clearly > noticeable (and the designer will kill me). Both machines are running > Python 2.4.2 and PIL 1.1.5. > > Any ideas, anyone? > > -- > DR. > > _______________________________________________ > Image-SIG maillist - Image-SIG at python.org > http://mail.python.org/mailman/listinfo/image-sig > From bob at redivi.com Sat Jul 29 22:53:22 2006 From: bob at redivi.com (Bob Ippolito) Date: Sat, 29 Jul 2006 13:53:22 -0700 Subject: [Image-SIG] Truetype representation in Windows and Linux In-Reply-To: References: <24332.217.116.100.229.1154199244.squirrel@mail.myfonts.com><24332.217.116.100.229.1154199244.squirrel@mail.myfonts.com> Message-ID: <1E6184FE-0BFB-4189-9AEF-9B2AE995AB10@redivi.com> The FreeType port on FreeBSD has an option to *turn off* the bytecode interpreter (WITHOUT_TTF_BYTECODE_ENABLED). Presumably that's not the issue because you'd have had to intentionally turn it off. Perhaps FreeType's implementation just isn't as good as the one in Windows. -bob On Jul 29, 2006, at 12:31 PM, wrote: > Thanks for the tip. Any clues on how to go about this? I'm actually > using the FreeBSD > ports (I lied about Linux) and I'm not really up to speed with > building stuff. What > would I need to run to fix this? > > Sorry about the newbie questions and thanks for any help. > -- > DR. > > > On Sat, 29 Jul 2006 14:54:04 -0400 (EDT), "Adam Twardoch" > wrote: >> My guess is that on your Windows machine, FreeType (that is used >> to render >> texts from PIL) is compiled with native TrueType hinting support >> enabled >> while on Linux, you have FreeType without native TrueType hinting >> option. >> You'd need to build FreeType with native TrueType hinting enabled >> to get >> the same results as on Windows. >> >> A. >> >> >>> Hi, >>> >>> I'm using PIL to dynamically create graphical text headers for my >> website, >>> using a truetype font. Testing this at home on my Windows box works >> fine. >>> When I upload it to the Linux server, the fonts appear subtly >>> different >> - >>> the size of the overall image isn't quite right, and the text >>> appears >>> either squashed or spaced wrongly. >>> >>> Here's the relevant code: >>> >>> imf = ImageFont.truetype(fontfile, int(fontsize)) >>> size = imf.getsize(header) >>> im = Image.new("RGB", size, "white") >>> draw = ImageDraw.Draw(im) >>> draw.text((0, 0), header, font=imf, fill=colour) >>> >>> With fontfile and fontsize set to the relevant values, and using >>> sample >>> text "Randomtext", this produces an image of size 227x44 on >>> Windows and >>> 229x44 on Linux - doesn't sound like much, but the difference is >>> clearly >>> noticeable (and the designer will kill me). Both machines are >>> running >>> Python 2.4.2 and PIL 1.1.5. >>> >>> Any ideas, anyone? >>> >>> -- >>> DR. >>> >>> _______________________________________________ >>> Image-SIG maillist - Image-SIG at python.org >>> http://mail.python.org/mailman/listinfo/image-sig >>> > > _______________________________________________ > Image-SIG maillist - Image-SIG at python.org > http://mail.python.org/mailman/listinfo/image-sig From fredrik at pythonware.com Mon Jul 31 14:12:43 2006 From: fredrik at pythonware.com (Fredrik Lundh) Date: Mon, 31 Jul 2006 14:12:43 +0200 Subject: [Image-SIG] Truetype representation in Windows and Linux In-Reply-To: <27b46e7b1fdc3942319e8836326e1769@mail.roseman.org.uk> References: <27b46e7b1fdc3942319e8836326e1769@mail.roseman.org.uk> Message-ID: daniel at roseman.org.uk wrote: > I'm using PIL to dynamically create graphical text headers for my > website, using a truetype font. Testing this at home on my Windows box > works fine. When I upload it to the Linux server, the fonts appear > subtly different - the size of the overall in addition to the native hinting issues, check the versions of the freetype and PIL libraries. I've seen rather large differences between the output from different freetype versions (probably due to improvements/bug fixes in freetype's autohinter), and the font metric calculation was changed in PIL 1.1.6b1, to better handle fonts with "excessive bearings". From java.jago at gmail.com Thu Jul 27 12:31:10 2006 From: java.jago at gmail.com (Andreas Schmidt) Date: Thu, 27 Jul 2006 12:31:10 +0200 Subject: [Image-SIG] Subsampling in Thumbnail Mode for Jpeg files..? Message-ID: Hi, Sorry, I have a couple of questions: 1. When I create a thumbnail with PIL it is extremly fast! Is this speadup due to the subsampling (using only the DC component) alone ? Or are there some other tricks ? 2. In thumbnail-Mode - does PIL still read the full jpeg stream from disk and then only reads the Bytes of the DC component ? Or does PIL directly read less Bytes from the disk, i.e. only the Bytes of the DC component ? How does it "know" which Bytes belong to the DC component ? 3. I guess 1/8 is the limit for subsampling since 8x8 blocks are used and PIL is taking only the DC component is that case ? 4. What tricks is PIL using to speed up Thumbnail creation ? Cheers, jago -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/image-sig/attachments/20060727/3b0c9d2d/attachment.html From java.jago at gmail.com Thu Jul 27 13:13:56 2006 From: java.jago at gmail.com (Andreas Schmidt) Date: Thu, 27 Jul 2006 13:13:56 +0200 Subject: [Image-SIG] Is there a PIL convert to Java ? Perhaps an interface to Java ? Message-ID: Hi, I would like to use the power of PIL in Java. My favorite solution would be a 100% convertion of the PIL Python and C-Code to Java. I guess this doesn't exist ? I didn't find anything with google. How difficult would it be to do a conversion of the Code to Java ? Is there perhaps an interface with which I could use it in Java ? Cheers, jago -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/image-sig/attachments/20060727/f3826d6d/attachment.htm