
It turns out that some HTML tags work in Skype chat, including
<font color = "">Thanks to this it is possible to create simple images in the text of messages.
List of Skype tags supported on
www.wikireality.ru/wiki/HTML_v_SkipeIn order to send HTML-code in the chat you need to hold down CTRL + SHIFT and click on the button to send the message.
')
Image code
pastebin.com/raw.php?i=z4EspzjCBelow is an example of generating HTML code from an image in PHP.
$imgw = imagesx($img); $imgh = imagesy($img); $ratio = $imgw/$imgh; $newh = floor(sqrt(800 / $ratio)); $neww = floor($ratio * $newh); $newimg = imagecreatetruecolor($neww, $newh); imagecopyresampled($newimg, $img, 0, 0, 0, 0, $neww, $newh, $imgw, $imgh); imagedestroy($img); $out = '<font size="1"><u>'; for($j = 0; $j < $newh; $j++) { for ($i = 0; $i < $neww; $i++) { $color = imagecolorat($newimg, $i, $j); $out .= '<font color="#'.strtoupper(dechex($color)).'">███</font>'; } $out .= "\n"; } $out .= '</u></font>'; echo $out;
The code is quite primitive, because each pixel is processed, even if several pixels of the same color go in a row. If you optimize the code in such a way as to generate more compact HTML, it is possible to create higher resolution images. Everything rests on the maximum size of the message in skype - 29,999 characters (the symbol █ is considered to be three ordinary).
Attention, with a large number of such images, skype starts to slow down a lot, only clearing history saves. Therefore, it is better to delete the message with the picture.
Works only in Windows version.
You can try here
img4skype.comPS We will be glad if someone can optimize the code for generating images of higher resolution.
UPD: sergey_dobrodey Wrote a version on .NET with the ability to create pictures of 40x40 pixels but with inverting colors
github.com/sergeydobrodey/SkypeImageUPD: aruz Wrote an implementation on .NET generating optimized HTML code with the ability to adjust the final size and the ability to reduce the number of colors
github.com/aruz/img4skypeThis allowed creating huge images (the first one was generated by my algorithm)
UPD: In the new version of Skype 5.8.0.154 is no longer possible to send HTML. But at the same time, the code sent from the younger version is displayed normally in the new version. To send the code you need version ≤5.7