OK, this is the code:

        """
        image is the object instance of Image class which contains all
informations
        """
        pil = Image.open( os.path.join( image.path,image.name ) )

        if image.rotation_angle != 2:
            try:
                pil = pil.rotate( rotation_levels[image.rotation_angle]
)
            except:
                traceback.print_exc()
                result = False


        if ( image.cropped ):

                box = [ float(image.cropX) , \
                    float(image.cropY) , \
                    (float(image.cropX)+float(image.cropW)), \
                    (float(image.cropY)+float(image.cropH))
                    ]

                try:
                    pil = pil.crop( box )
                except:
                    traceback.print_exc()

        if pil.size[0] < pil.size[1]:
            try:
                pil = pil.rotate( 90 )
            except:
                traceback.print_exc()

         filtro_compressione = Image.BILINEAR

         try:
                pil =
pil.resize((image.realW,image.realH),filtro_compressione)
         except:
                traceback.print_exc()


    if not pil.mode == 'RGB':
        try:

            pil = pil.convert('RGB')

        except:

            traceback.print_exc()

    try:

        pil.save( path, format="JPEG", quality=80 )


    except Exception,e:
        traceback.print_exc()

I think this is very normal.
It's NOT normal that don't work well on PC SMP processor...

not?

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to