aamalig / django-profile

Automatically exported from code.google.com/p/django-profile
BSD 2-Clause "Simplified" License
0 stars 0 forks source link

Resolving problems with avatar croping #52

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
As i said i issue 49, i've done a patch for resolving 3 problems with croping :

1) your commit 387 has an issue when i crop a from the left
2) in my firefox the javascript give me corrdinates that are floats and not
ints
3) and wht if the user doesn't want at all crop it's image

You can find my patch attached, which resolves these three things (two
files : forms and views)

A summary :

for 1 : use "is None" instead of "not"
for 2 : create a new field type "AvatarCoordinateField" with convert the
values from string/float to int
for 3 : passe the image to the form and if no coordinate at all, use full
image size

Original issue reported on code.google.com by stephane.angel on 7 Apr 2009 at 11:36

Attachments:

GoogleCodeExporter commented 8 years ago
Stephane, you're totally right, thanks so much for sharing your work.

I'm going to commit your patches to the trunk

Original comment by david.ru...@gmail.com on 8 Apr 2009 at 7:36

GoogleCodeExporter commented 8 years ago
Commited.

Original comment by david.ru...@gmail.com on 8 Apr 2009 at 7:47