问题描述
最近,我用我最喜欢的图像编辑器制作了一个1x1的黑色像素(当您想廉价地用HTML绘制实心框时可以派上用场).即使我将其制作为单色PNG,它的大小还是120字节!我的意思是,那太陡了. 120个字节一个像素.然后,我将其转换为GIF,将其大小减小到43个字节.好多了,但仍然...
Recently, I used my favorite image editor to make a 1x1 black pixel (which can come in handy when you want to draw solid boxes in HTML cheaply). Even though I made it a monochrome PNG, it came out to be 120 bytes! I mean, that's kind of steep. 120 bytes. For one pixel. I then converted it to a GIF, which dropped the size down to 43 bytes. Much better, but still...
是或生成的最短图像文件或程序是一个1x1黑色像素.提交内容可能是:
The shortest image file or program that is or generates a 1x1 black pixel. A submission may be:
- 代表1x1黑色像素的图像文件.选择的格式必须能够代表大于1x1的图像,并且不能是临时的(也就是说,它不能是您仅用于编码高尔夫的图像格式).图像文件将按字节数排名.
- 生成此类图像文件的程序.程序将按照字符计数进行排序,就像在代码高尔夫中一样.
只要答案属于这两类之一,任何事情都是公平的.
As long as an answer falls into one of these two categories, anything is fair game.
对于图像文件,请以十六进制或转义形式指定它们,而不要使用外部图像主机:-)
Also, for image files, please specify them in hexadecimal or escapes rather than using an external image host :-)
推荐答案
WBMP ,5个字节:
WBMP, 5 bytes:
00 00 01 01 00
无法想象更小的东西
这篇关于高尔夫代码:1x1黑色像素的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!