ForumSite Announcements ► Profile Pic Imagifier
Modern solutions for modern problems.

I made a tool in C# to convert 32 x 32 images into Blake's compressed image string format. It's not very thoroughly tested, but it should work on 64-bit Windows at least.

Here it is.

Instructions (using Chrome, instructions may vary slightly for other browsers):
  • Resize your image to 32 x 32.
  • Run the tool and select your image. It will be copied to your clipboard.
  • Go to the profile editing page.
  • Right-click somewhere on the page, and choose "Inspect element".
  • Click the dropdown icons to expand body -> centerer -> content_begin_no_nav -> content_host -> draw_current_avatar.
  • Between <div id="draw_current_avatar" style="display:none"> and </div>, there should be a string of characters in quotes representing your current avatar. Double click this, and then paste your new string generated by my program. Make sure you don't overwrite the quotes.
  • Click "Cancel".
  • Click "OK".

Note: My avatar is currently bugged. I'm not sure if this is related to using my tool. But it looks correct on the drawing page.
  
Neat!
  
...it was only a matter of time
  
I'm guessing you're not pleased by this?

Either way, I'll have a go at it, see how it works.
  
That's pretty rad.
  
Seem's something's wrong. >.> In how the avatars are stored and retrieved?

And Blake, I was planning on doing something myself eventually, so it was doomed from the beginning.
  
Note: My avatar is currently bugged. I'm not sure if this is related to using my tool. But it looks correct on the drawing page.
Same deal after I used your tool. I'm guessing there's a limit to how many specific colors it will display?

Edit: This [originally: current] one is just a total glitch when I was trying to return to my previous one.

Edit: That second glitch was because I forgot I had made the image saved as 32x32 into 64x64 to make the paint-by-number process a little easier on the eyes. It still looks kind of cool.
  
Source, for any interested: https://drive.google.com/file/d/0B2KonnPQFFu7YzNGbmtXNHF3cms/view?usp=sharing

Eventually I'll probably put it on github instead of zipping it maybe.
  
I just realized that this changed today :O brb porting this code to Java so that it is more portable (and maybe even useful on the TCaS app once I get around to the Forum feature)

EDIT: Got it! Download it here while it's hot!
https://github.com/kylemsguy/JProfilePicImagifier/releases
Usage: On Windows you could probably just drag the image onto the .jar file (I think...)
On Linux/OS X just run java -jar JProfilePicImagifier.jar <imagename>


EDIT 2: An update on usage: Just double click on the .jar or .exe file and follow the on-screen instructions. (sidenote: GUI design is really annoying)

Screenshot of app :D
  
So, why do we have to draw our avatars now?
  
Because I'm weird.
  
I've just stumbled on something related to this while coding up the Profile image changer on the TCaS app I'm working on.

It turns out that the strange r1|g1|b1,r2|g2|b2,... format isn't actually used when saving the image on the Draw page. Instead, the pixels on the canvas are encoded into a format that uses symbols to represent values from 0-63, and then they're compressed using the same encoding to denote the counts of each colour...

The reason that we have never encountered this encoding before is because we used TCaS's draw page to first inject an encoded string with the first encoding (see above) into a hidden div, used the cancel code to load that back to the Canvas, and then used TCaS's own code to encode that into the compressed format before submitting it.

I only encountered this format when I tried directly submitting an image encoded with the first encoding via POST request. The result? Stripes (see this page for an example). Furthermore, the string that is in the div on the Draw page is 2048 pixels long, instead of 1024 (32x32). When investigating why this was happening, I found this other format, and I've annotated the code that does the encoding. If you're interested, see here: http://pastebin.com/DUWDXSAq.

So yeah, if you want to write tools to completely skip using the Developer Console to inject your profile images, you can do so now :P
  
I kinda like the fact that the only way to get an avatar is too draw it. It makes people spend time on their avatars, instead of just copying something of google images, and it also shows how much effort people put into this site. But my avatar is pretty bad, and I might use this tool to make a better one.
  
Why do a compression step for 8KB of image data?
  
Blake said:
Because I'm weird.
  
He hopes one will become a diamond and he'll be rich.

So far, nothin'


Deja vu.
  
Practice run for making the regular avatars be downloaded the same way and decoded client-side? Because that would also be weird ; )
  
For some reason, both versions of these programs just cause Windows Explorer to crash on my computer. Unless I run it in Avast Sandbox, in which case they run perfectly fine. Kind of odd.
  
That's really strange... you might want to get your computer checked out. To be honest, I never really tried my version of the tool on anything other than Linux, because I wrote it mostly because .net support on Linux leaves much to be desired. Oh, and easy porting to Android is a bonus too (it's what influenced me to write it in Java of all languages).

I kinda like the fact that the only way to get an avatar is too draw it. It makes people spend time on their avatars, instead of just copying something of google images, and it also shows how much effort people put into this site. But my avatar is pretty bad, and I might use this tool to make a better one.

With this tool (and mine), you could copy something off of google. The HTML5 canvas is really annoying to draw with though. My profile picture was a downsized picture of <>< created in GIMP because I got too annoyed at trying to draw it on the canvas.
  
Yeah, I know, but that is why I kinda liked the canvas editor. Also, I think Blake compresses it because if people change the avatars a lot or something he doesn't want it taking up a lot of space.

Edit: Post 444
  
I don't think he stores the previous avatars, so that's a moot point. There aren't that many users here with the new avatar too, so the size of everyone's avatars is no longer an issue either.
  
kylemsguy said:
I don't think he stores the previous avatars
I do. I was adding a gallery feature where you could make and share images with each other since I had a feeling threads like this would inevitably be a thing. But I ran out of time. Everything is saved in the database.

In the mean time, if anyone has an old avatar they'd like to go back to, feel free to ping me and I can force it back.
  
You can see a gallery of photos by clicking on your photo, and seeing view image location, and then changing the number in the url.
  
But that's just tedious.
  
Blake said:
kylemsguy said:
I don't think he stores the previous avatars
I do. I was adding a gallery feature where you could make and share images with each other since I had a feeling threads like this would inevitably be a thing. But I ran out of time. Everything is saved in the database.

In the mean time, if anyone has an old avatar they'd like to go back to, feel free to ping me and I can force it back.

Oh. I stand corrected then.
  
Forum > Site Announcements > Profile Pic Imagifier