Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 584128 | Differences between
and this patch

Collapse All | Expand All

(-)photofilmstrip-2.1.0/photofilmstrip/core/ProjectFile.py (-1 / +1 lines)
Lines 196-202 Link Here
196
    def __ThumbToQuery(self, picId, pic):
196
    def __ThumbToQuery(self, picId, pic):
197
        pilThumb = PILBackend.GetThumbnail(pic, height=120)
197
        pilThumb = PILBackend.GetThumbnail(pic, height=120)
198
        thumbWidth, thumbHeight = pilThumb.size
198
        thumbWidth, thumbHeight = pilThumb.size
199
        thumbData = buffer(pilThumb.tostring())
199
        thumbData = buffer(pilThumb.tobytes())
200
        
200
        
201
        query = "INSERT INTO `thumbnail` (" \
201
        query = "INSERT INTO `thumbnail` (" \
202
                    "picture_id, width, height, data" \
202
                    "picture_id, width, height, data" \
(-)photofilmstrip-2.1.0/photofilmstrip/core/renderer/CairoRenderer.py (-1 / +1 lines)
Lines 121-127 Link Here
121
    def _PilToCairo(self, pilImg):
121
    def _PilToCairo(self, pilImg):
122
        pilImg = pilImg.copy()
122
        pilImg = pilImg.copy()
123
        w, h = pilImg.size  
123
        w, h = pilImg.size  
124
        data = pilImg.convert('RGBA').tostring()
124
        data = pilImg.convert('RGBA').tobytes()
125
        buff = array.array('B', data)
125
        buff = array.array('B', data)
126
        cairoImage = cairo.ImageSurface.create_for_data(buff, cairo.FORMAT_ARGB32, w, h)
126
        cairoImage = cairo.ImageSurface.create_for_data(buff, cairo.FORMAT_ARGB32, w, h)
127
#        cairoImage = cairo.ImageSurface.create_for_data(buff, cairo.FORMAT_RGB24, w, h)
127
#        cairoImage = cairo.ImageSurface.create_for_data(buff, cairo.FORMAT_RGB24, w, h)
(-)photofilmstrip-2.1.0/photofilmstrip/core/renderer/PyGameRenderer.py (-1 / +1 lines)
Lines 100-106 Link Here
100
    def _PilToPyGame(self, pilImg):
100
    def _PilToPyGame(self, pilImg):
101
        mode = pilImg.mode
101
        mode = pilImg.mode
102
        assert mode in "RGB", "RGBA"
102
        assert mode in "RGB", "RGBA"
103
        return pygame.image.fromstring(pilImg.tostring(), pilImg.size, mode)
103
        return pygame.image.frombytes(pilImg.tobytes(), pilImg.size, mode)
104
104
105
105
106
#    def CropAndResize(self, ctx, rect):
106
#    def CropAndResize(self, ctx, rect):

Return to bug 584128