SMF Development > Bug Reports

Avatar resize

<< < (4/5) > >>

Charlie82:
Ok.

Floor (SMF default):
http://www.simplemachines.org/community/index.php?action=dlattach;topic=315835.0;attach=101804
Dimensions: 85x63
Aspect ratio: 1,35

Round:
http://www.simplemachines.org/community/index.php?action=dlattach;topic=315835.0;attach=101805
Dimensions: 85x64
Aspect ratio: 1,33

Photoshop:
http://www.simplemachines.org/community/index.php?action=dlattach;topic=315835.0;attach=101806
Dimensions: 85x64
Aspect ratio: 1,33

Original image:
http://s9.postimage.org/vsb7h6on3/Oryx_Antelope.jpg
Dimensions: 1024x768
Aspect ratio: 1,33

Bug:
Floor (SMF default) has wrong aspect ratio.

Recreation:
Just upload the original image to SMF with max heigh and width 85px, and do width/height of the SMF resized image.

Solution:
Use round() instead of floor().

emanuele:
Maybe it's because last night I didn't sleep, and now it's almost midnight, but I don't see how floor it's better than round...

I would see a pair of numbers where the value actually end up too high, just for personal curiosity.

Charlie82:
So then you think like me that round() should be used.

It could be very exciting to have that bug resolved 3 years later.

Antechinus:
Give that people have been using it the way it is for years, and that the difference is only one pixel, what exactly is so exciting about this? Most people would never notice a one pixel change in aspect ratio if they weren't actively checking the exact dimensions all the time.

Oh and by the way, this is ludicrous:


--- Quote from: Charlie82 on December 16, 2011, 11:41:05 AM ---If it only matter what we can see... why not leave all vulnerabilities unpatched? Anyways people wont see them...

--- End quote ---

It is completely unreasonable to compare a one pixel change in aspect ratio on a resized avatar to unpatched security exploits. If you think there is any similarity in severity between the two, you might like to reconsider.

Charlie82:
Maybe it is cause I'm obsessive compulsive but anyway when you program something you want to make it good by design, you don't know what kind of errors can occur in the worst scenarios or in the future.

The exciting is being constant at one thing and get it no matter the time has passed. It is like the The Shawshank Redemption (1994) film, the prisoner sentenced forever unjustly work for 20 years to get the freedom.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version