Codeforces' Hidden Feature — Multiple Profile Images!

Правка en5, от HYPERHYPERHYPERCUBELOVER, 2016-02-14 20:50:41

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

I can't believe that.

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

Why does this happen?

I uploaded this to change my profile image. The result was interesting. The large profile image was almost black, but the small was white. I thought that Codeforces uses Nearest-neighbor interpolation to scale images in proper sizes.

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 eventually found how to make profile images look different.

So, how did you do it?

I used this python script to create a 3600x3600 image that will make your profile images look different. Requirements are Python 3 and PIL. First, save a 300x300 image that you would like you use as the main profile picture as 'pic1.png'. Likewise, save a 80x80 image for the sub profile picture as 'pic2.png'. Finally, run the script and it will merge these images into a 3600x3600 image named 'pic.png'.

Have fun! XD

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en13 Английский HYPERHYPERHYPERCUBELOVER 2016-02-14 23:13:23 0 (published)
en12 Английский HYPERHYPERHYPERCUBELOVER 2016-02-14 23:12:55 5 Tiny change: 's is just guessing!)\n\nNear' -> 's is just a guess!)\n\nNear' (saved to drafts)
en11 Английский HYPERHYPERHYPERCUBELOVER 2016-02-14 21:12:40 0 (published)
en10 Английский HYPERHYPERHYPERCUBELOVER 2016-02-14 21:09:34 0 Tiny change: 'per sizes.\n\nNeares' -> 'per sizes. (This is just guessing!)\n\nNeares'
en9 Английский HYPERHYPERHYPERCUBELOVER 2016-02-14 21:06:46 25 Tiny change: 'per sizes.\n\nNeares' -> 'per sizes. (This is just guessing!)\n\nNeares'
en8 Английский HYPERHYPERHYPERCUBELOVER 2016-02-14 21:00:47 30 Tiny change: 'ile image are different' -> 'ile image looks different'
en7 Английский HYPERHYPERHYPERCUBELOVER 2016-02-14 20:57:37 205 Tiny change: 'ile image are different' -> 'ile image looks different'
en6 Английский HYPERHYPERHYPERCUBELOVER 2016-02-14 20:51:28 8 Tiny change: 'ile image are different' -> 'ile image looks different'
en5 Английский HYPERHYPERHYPERCUBELOVER 2016-02-14 20:50:41 819
en4 Английский HYPERHYPERHYPERCUBELOVER 2016-02-14 20:04:33 256
en3 Английский HYPERHYPERHYPERCUBELOVER 2016-02-14 19:43:36 722
en2 Английский HYPERHYPERHYPERCUBELOVER 2016-02-14 19:23:50 50 Tiny change: 'different!\n\nYou can't ' -
en1 Английский HYPERHYPERHYPERCUBELOVER 2016-02-14 18:53:55 486 Initial revision (saved to drafts)