mirror of
https://github.com/Hopiu/django-imagekit.git
synced 2026-03-24 17:00:24 +00:00
Prefer cStringIO.
This commit is contained in:
parent
db86d7ed66
commit
5e72d9f5e4
1 changed files with 5 additions and 3 deletions
|
|
@ -6,11 +6,13 @@ spec found.
|
|||
|
||||
"""
|
||||
import os
|
||||
from StringIO import StringIO
|
||||
import cStringIO as StringIO
|
||||
|
||||
from django.core.files.base import ContentFile
|
||||
|
||||
from imagekit import processors
|
||||
from imagekit.lib import *
|
||||
from imagekit.utils import img_to_fobj
|
||||
from django.core.files.base import ContentFile
|
||||
|
||||
|
||||
class ImageSpec(object):
|
||||
|
|
@ -60,7 +62,7 @@ class Accessor(object):
|
|||
except IOError:
|
||||
return
|
||||
fp.seek(0)
|
||||
fp = StringIO(fp.read())
|
||||
fp = StringIO.StringIO(fp.read())
|
||||
self._img, self._fmt = self.spec.process(Image.open(fp), self._obj)
|
||||
# save the new image to the cache
|
||||
content = ContentFile(self._get_imgfile().read())
|
||||
|
|
|
|||
Loading…
Reference in a new issue