534

C# I put a random pixel in the middle, and then start putting random pixels in a neighborhood that most resembles them. Two modes are supported: with minimum selection, only one neighboring pixel is considered at a time; with average selection, all (1..8) are averaged. Minimum selection is somewhat noisy, average selection is of course more blurred, but ...


259

Python 3, 190 172 171 169 167 160 159 147 143 bytes Using PIL version 1.1.7 which has a deprecated but not removed offset method. from PIL.ImageDraw import* i=Image.new('RGB',(25,18),'#d72828') Draw(i).rectangle((1,1,23,16),'#0048e0',~0) i.offset(9).resize((100,72)).show() Creates a 25*18 pixel image filled with red then draws a 23*16 pixel rectangle ...


248

Processing Update! 4096x4096 images! I've merged my second post into this one by combining the two programs together. A full collection of selected images can be found here, on Dropbox. (Note: DropBox can't generate previews for the 4096x4096 images; just click them then click "Download"). If you only look at one look at this one (tileable)! Here it is ...


220

Python w/ PIL This is based on a Newtonian Fractal, specifically for z → z5 - 1. Because there are five roots, and thus five convergence points, the available color space is split into five regions, based on Hue. The individual points are sorted first by number of iterations required to reach their convergence point, and then by distance to that point, with ...


209

Table cloths Flat I started out putting a plaid/gingham pattern into perspective like a boundless table cloth: unsigned char RD(int i,int j){ float s=3./(j+99); return (int((i+DIM)*s+j*s)%2+int((DIM*2-i)*s+j*s)%2)*127; } unsigned char GR(int i,int j){ float s=3./(j+99); return (int((i+DIM)*s+j*s)%2+int((DIM*2-i)*s+j*s)%2)*127; } unsigned ...


192

Random painter char red_fn(int i,int j){ #define r(n)(rand()%n) static char c[1024][1024];return!c[i][j]?c[i][j]=!r(999)?r(256):red_fn((i+r(2))%1024,(j+r(2))%1024):c[i][j]; } char green_fn(int i,int j){ static char c[1024][1024];return!c[i][j]?c[i][j]=!r(999)?r(256):green_fn((i+r(2))%1024,(j+r(2))%1024):c[i][j]; } char blue_fn(int i,int j){ ...


162

Some swirly pointy things Yes, I knew exactly what to name it. unsigned short RD(int i,int j){ return(sqrt(_sq(73.-i)+_sq(609-j))+1)/(sqrt(abs(sin((sqrt(_sq(860.-i)+_sq(162-j)))/115.0)))+1)/200; } unsigned short GR(int i,int j){ return(sqrt(_sq(160.-i)+_sq(60-j))+1)/(sqrt(abs(sin((sqrt(_sq(86.-i)+_sq(860-j)))/115.0)))+1)/200; } unsigned short BL(...


159

Java - GUI with progressive randomized transformation I tried a LOT of things, some of them very complicated, then I finally came back to this relatively-simple code: import java.awt.BorderLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.image.BufferedImage; import java.io.File; import java.io.IOException; ...


142

AutoIt, VB Introduction This is an implementation of the Object Removal by Exemplar-Based Inpainting algorithm developed by A. Criminisi, P. Perez (Cambridge Microsoft Research Ltd.) and K. Toyama (Microsoft) [X]. This algorithm is targeted at high-information images (and video frames) and aims to be the balance between structural reconstruction and ...


130

I got this idea from user fejesjoco's algorithm and wanted to play a bit, so I started to write my own algorithm from scratch. I'm posting this because I feel that if I can make something better* than the best out of you guys, I don't think this challenge is finished yet. To compare, there are some stunning designs on allRGB that I consider way beyond the ...


129

Python 3.4 Using the turtle module. The turtles are different colours and they always face in the same direction, so they can be easily seen to be moving along straight lines by just focusing on one of them. Despite this the circle illusion is still strong. The illusion still seems quite strong even with just 3 or 4 turtles: The framerate is reduced ...


123

Of course, there has to be a Mandelbrot submission. char red_fn(int i,int j){ float x=0,y=0;int k;for(k=0;k++<256;){float a=x*x-y*y+(i-768.0)/512;y=2*x*y+(j-512.0)/512;x=a;if(x*x+y*y>4)break;}return k>31?256:k*8; } char green_fn(int i,int j){ float x=0,y=0;int k;for(k=0;k++<256;){float a=x*x-y*y+(i-768.0)/512;y=2*x*y+(j-512.0)/512;x=a;if(...


120

Mandelbrot 3 x 133 chars The first thing that popped into my mind was "Mandelbrot!". Yes, I know there already is a mandelbrot submission. After confirming that I'm able to get it below 140 characters myself, I have taken the tricks and optimizations from that solution into mine (thanks Martin and Todd). That left space to choose an interesting location ...


118

Java import java.awt.Point; import java.awt.image.BufferedImage; import java.io.File; import java.io.IOException; import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; import java.util.HashSet; import java.util.Iterator; import java.util.LinkedList; import java.util.List; import java.util.Random; import javax.imageio.ImageIO;...


117

x86 real-mode machine code for DOS COM, 69 65 63 62 bytes The code is meant to be executed as a DOS COM executable. Special thanks meden, saved four bytes. meden, saved two bytes and removed the flickering. Machine code (in hex bytes) 68 00 A0 07 B8 13 00 CD 10 BE 23 01 AD 91 AD 91 AC E3 FE 60 30 ED F3 AA 61 81 C7 40 01 FE CD 75 F2 EB E9 ...


116

Mathematica, score 14125.71333 "a.png"~Export~ConstantImage[{28,34,41}/95,{386,320}] Saves this image: to a.png.


116

Minecraft Chat (vanilla 1.10 client, spigot 1.10 server): 19 bytes &4I &1V&4o&1t&4e&1d or from the clientside: §4I §1V§4o§1t§4e§1d Minecraft uses a color coding system with these colors programmed in. Mind the rules: Writing the text to a console using color formatting. In this case you may approximate pure red and blue ...


110

Julia sets If there's a Mandelbrot, there should be a Julia set too. You can spend hours tweaking the parameters and functions, so this is just a quick one that looks decent. Inspired from Martin's participation. unsigned short red_fn(int i, int j){ #define D(x) (x-DIM/2.)/(DIM/2.) float x=D(i),y=D(j),X,Y,n=0;while(n++<200&&(X=x*x)+(Y=y*y)<...


110

Java, 7399.80678201 This reminded me of a project I had in my numerical computations class a few semesters back, which was to draw a silhouette of Mount Everest using polynomial interpolation. That was done in MATLAB, but I'm not very fond of MATLAB, so I decided to work in Java. The basic idea behind it is that I chose "smart" points (read here as "random")...


109

Pyth (no built-in compression), score 4695.07 4656.03 4444.82 Pyth’s only image-related functionality is a builtin to write a matrix of RGB triples as an image file. So the crazy idea here is to train a small deep neural network on the (x, y) ↦ (r, g, b) function representing the image, and run it on the coordinates of each pixel. The plan Write a custom ...


107

This one is interesting because it doesn't use the i, j parameters at all. Instead it remembers state in a static variable. unsigned char RD(int i,int j){ static double k;k+=rand()/1./RAND_MAX;int l=k;l%=512;return l>255?511-l:l; } unsigned char GR(int i,int j){ static double k;k+=rand()/1./RAND_MAX;int l=k;l%=512;return l>255?511-l:l; } ...


107

C, 82 80 78 74 54 bytes Thanks to @WillihamTotland and @criptych for saving 2 bytes each! f(){puts("␛[47;31mI␛[34m V␛[31mo␛[34mt␛[31me␛[34md");} Where the ␛s represent 0x1B bytes (escape key). As this code contains unprintable control characters, here is a reversible hexdump: 00000000: 6628 297b 7075 7473 2822 1b5b 3437 3b33 f(){puts(".[47;3 00000010: ...


104

/* RED */ int a=(j?i%j:i)*4;int b=i-32;int c=j-32;return _sq(abs(i-512))+_sq(abs(j-512))>_sq(384)?a:int(sqrt((b+c)/2))^_cb((b-c)*2); /* GREEN */ int a=(j?i%j:i)*4;return _sq(abs(i-512))+_sq(abs(j-512))>_sq(384)?a:int(sqrt((i+j)/2))^_cb((i-j)*2); /* BLUE */ int a=(j?i%j:i)*4;int b=i+32;int c=j+32;return _sq(abs(i-512))+_sq(abs(j-512))>_sq(...


98

C: 3863 1144 1023 999 942 927 The original solution saves 2 pnm files per run (one with g appended, before dithering). Because the dithering wasn't beautiful for the first few lines, there is a hack in place to render more lines than needed, and crop during output. The golfed solution has a simpler dithering and saves only the dithered image. (no warnings ...


97

Perl, with Lab color space and dithering Note: Now I have a C solution too. Uses a similar approach to aditsu's, (choose two random positions, and swap the pixels at those positions if it would make the image more like the target image), with two major improvements: Uses the CIE Lab* color space to compare colors — the Euclidean metric on this space is a ...


97

C Result: #include <stdio.h> #include <Windows.h> #include <Math.h> int round (double r) { return (r > 0.0) ? (r + 0.5) : (r - 0.5); } void print (int x, int y, char c) { COORD p = { x, y }; SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), p); printf("%c", c); } int main () { float pi = 3.14159265358979323846;...


96

T-SQL, 442 441 426 355 349 344 bytes DECLARE @ VARCHAR(MAX)=REPLACE(REPLACE(REPLACE('DECLARE @a5MULTIPOINT((0 31),(19 -2),(-19 -2))'',@b5MULTIPOINT((0 39),(26 -6),(-26 -6))'',@5POINT(0 9)'',@d5LINESTRING(0 9,0 99,90 -43,0 9,-90 -43)''SELECT @a830%b821)%86)%d81)%d84%819))).STUnion(@827%820)).STIntersection(@b819)))' ,8,'.STBuffer('),5,' GEOMETRY='''),'%',')....


94

Sharp EL-9300 Graphics Calculator, 296 bytes This was my secondary school graphing calculator, getting on for 20 years ago! I remember writing a mandelbrot generator for it way back then. And sure enough, its still sitting there in the NV memory: ClrG DispG Range -2.35,2.35,.5,-1.55,1.55,0.5 y=-1.55 Label ly x=-2.35 Label lx n=1 zx=0 zy=0 Label ln tzx=zx²...


91

Python3.4+, 4697.26 I used the same method as in my ImageMagick answer, but with the following parameters: convert ORIGINAL.png -filter Lanczos2 -resize x32 - | pngquant --speed 1 -f 20 > i Using these parameters I generated the following 1003 byte Python program (I didn't find any improvements over @kennytm's output method): import base64,io,PIL....


89

Haskell - low quality code I was extremely tired when I wrote this. I might have gone too far with projections idea, anyway, here's the projection the program uses. Basically like projecting earth onto a cube and then unfolding it. Besides, in this projection, the shadow is made of straight lines. The program uses current date/time, and outputs a PPM file ...


Only top voted, non community-wiki answers of a minimum length are eligible