Closed Bug 600423 Opened 14 years ago Closed 14 years ago

Icon resizing/processing logic

Categories

(addons.mozilla.org Graveyard :: Developer Pages, defect, P1)

defect

Tracking

(Not tracked)

RESOLVED FIXED
5.12.2

People

(Reporter: clouserw, Assigned: davedash)

References

Details

Chowse made an awesome chart at the bottom of http://people.mozilla.com/~chowse/drop/amo/devtools/v3/interaction/addon_icon.pngwhich shows what we should be doing for different sized icons (scaling/centering).

This bug includes:

- Making a generic amo.tasks.process_image function (you can take the guts out of users.tasks.resize_photo) which takes a src, dst, and a size and, following the rules above, spits out an image.

- Making users.tasks.resize_photo use the new function (resize_photo has some tests you can steal too)
Blocks: 603123
After talking to potch:

Centering will be done on the frontend.  This cuts down on unnecessary transmission of bytes.

Therefore given an image with dimensions x & y and we want it to fit in a m x m box:

if x & y < m we do nothing... 

if x or y > m we will scale it so longest side is 48

This is what we do now in our scaling functions.
Status: NEW → ASSIGNED
Putting this in amo.utils - we should never run this directly as a task.

http://github.com/jbalogh/zamboni/commit/bf97e5e
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.