I just use commandline imagemagick instead of PythonMagic, if the python bindings are the issue getting imagemagick to work.
-- cmd = 'convert -density 300 -flatten -interlace line -quality 92 -colorspace sRGB -thumbnail'.split() + size + [default_storage.path(name) + '[0]', 'jpg:-']
proc = Popen(cmd, stdout=PIPE, stderr=PIPE)
stdout, stderr = proc.communicate()
assert not proc.returncode, stderr + stdout
default_storage.save(request.path[1:], ContentFile(stdout))
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/7b9aff5d-de02-4cb5-8a2e-d8c65e0c3656%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment