remplace wand par pillow
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
from flask import Blueprint, Flask, request, flash, render_template, url_for, session, redirect, abort, make_response, send_file, escape, flash, abort
|
||||
from werkzeug.utils import secure_filename
|
||||
from wand.image import Image
|
||||
from PIL import Image
|
||||
import time
|
||||
import sqlite3
|
||||
import os
|
||||
@@ -29,8 +29,8 @@ def profile(username=None) :
|
||||
nom = secure_filename(f.filename)
|
||||
f.save(DOSSIER_PERSO + UTILISATEUR + '/profile/' + nom)
|
||||
image = DOSSIER_PERSO + UTILISATEUR + '/profile/' + nom
|
||||
with Image(filename = image) as img:
|
||||
img.transform(resize='x80')
|
||||
with Image.open(image) as img:
|
||||
img.tumbnails(resize='80x80')
|
||||
img.save(filename = DOSSIER_PERSO + UTILISATEUR + '/profile/' + nom)
|
||||
imagelocation = DOSSIER_PERSO + UTILISATEUR + '/profile/' + nom
|
||||
conn = sqlite3.connect('base.db') # Connexion à la base de donnée
|
||||
|
||||
Reference in New Issue
Block a user