Hello,

I'm using PIL library in Windows 7, 64 bits for to reduce the size of images. That library comes with the Qgis 2.8.2 instalation standard. The problem is that de resulting images are bad.

In previous versions of Qgis the code worked fine. I firstly instaled Qgis 2.8.2, 32 bits, but Python cant load _imaging module. I get that error when I use the resize method of a Image object.

With Qgis 64 bits, the module can be loaded, but the results are not correct when the images are resized (half of the image is black, o red). That's the code:

        im = PIL.Image.open(imgIn)

        tamX=im.size[0]
        factor=float(700)/tamX

out=im.resize([int(factor * s) for s in im.size],PIL.Image.ANTIALIAS)
         out.save(imgOut)

Then I can not resize the images with the PIL library that comes with the standard installation of Qgis 2.8.2.

At the same computer, I have installed Python 2.7, 32 bits, and PIL library. The same code works fine.

What I can do?

Thank you very much.

_______________________________________________
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


_______________________________________________
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Reply via email to