Thanks, that worked out! I tried to include it in includes before and
didn't work, obviously :)
Katya
On Thu, Jun 14, 2012 at 4:25 PM, Pham, Hien <[email protected]> wrote:
> Have you try to add PIL to “packages“ in the cx_freeze build script?****
>
> ** **
>
> *From:* Ekaterina Mishina-Syrkina [mailto:[email protected]]
> *Sent:* Thursday, June 14, 2012 10:07 AM
> *To:* primary discussion list for use and development of cx_Freeze
> *Subject:* [cx-freeze-users] PIL is ignored?****
>
> ** **
>
> Hello,
>
> I've recently included included small function using PIL in my project, no
> more than that:
>
> from PIL import Image, PngImagePlugin, JpegImagePlugin
> ...
> def pil_function():
> im = Image.open(self.img_sample)
> im.save('sample.png')
> imgpng = os.path.abspath('sample.png')
> x = int(self.imgwidth * self.info_resolution / 25.4) # size of the
> crop image in pixels
> im = Image.open(imgpng)
> (w, h) = im.size
> box = (int(0.5*(w-x)), int(0.5*(h-x)), int(0.5*(w+x)),
> int(0.5*(h+x)))
> imcrop = im.crop(box)
> imcrop.save(imgpng)
> self.img_sample = imgpng
>
> Now when I freeze the project it doesn't give any errors neither on
> compilation, nor on execution, but it looks like this function is not
> really executed - I don't have the image which should have been saved by
> this function, and all next steps after this functions are not done.
> Strangely, the program itself does not crash, so I can't track where it
> stops. If I comment out the pil_function() call, everything works fine.
>
> Any ideas?
>
> p.s. I use some weeks old development version of cx_freeze
>
> Thanks.
> Katya
>
>
> --
> Dr. Ekaterina Mishina
> Software project manager, IST Ltd.
> [email protected]
> www.istag.ch****
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> cx-freeze-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/cx-freeze-users
>
>
--
Dr. Ekaterina Mishina
Software project manager, IST Ltd.
[email protected]
www.istag.ch
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
cx-freeze-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cx-freeze-users