Блог пользователя HYPERHYPERHYPERCUBELOVER

Автор HYPERHYPERHYPERCUBELOVER, история, 8 лет назад, По-английски

I have noticed a strange feature while conducting some experiments. Look at the following. My large profile picture and small profile picture look different.

I can't believe that.

You can see that my profile pictures look different here and here. Still not convinced? Upload this and check how your profile pictures are changed.

Why does this happen?

I uploaded this to change my profile picture. The result was interesting. The large profile picture was almost black, but the small was white. I thought that Codeforces uses Nearest-neighbor interpolation to scale pictures in proper sizes. (This is just a guess!)

Nearest-neighbor interpolation selects the value of nearest point and does not consider the values of neighboring points at all. I tracked which values are used and found how to make profile pictures look different.

So, how did you do it?

I used this python script to create a 3600x3600 image that will make your profile pictures look different. Requirements are Python 3 and PIL. First, save a 300x300 image that you would like you use as the large profile picture as pic1.png. Likewise, save a 80x80 image for the sub profile picture as pic2.png. Finally, run the script and upload pic.png. pic1.png will be the large profile picture, while pic2.png being the small profile picture.

I hope you love this feature :D

Полный текст и комментарии »

  • Проголосовать: нравится
  • +672
  • Проголосовать: не нравится