Skip to main content
Commonmark migration
Source Link

Python 3, score 5390.25, 998 bytes##bytes

I used a simulated annealing program to fit rectangles into the shape of Starry Night. Then it uses a Gaussian blur to smooth out the straight rectangular edges.

To save some bytes, I compressed the rectangle data into base 94.

from PIL import Image as I,ImageDraw as D,ImageFilter as F
def V(n,f,t):
    z=0;s='';d='''0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!@#$%^&*()_-+={[}]|:;"',<.>/?`~ '''
    for i in n:z=z*f+d.index(i)
    while z:z,m=divmod(z,t);s=d[m]+s
    return s
i=I.new('RGB',(386,320))
K=V("""12XsPc/p^m(:,enp:SN8brwj%!iChDHKj"*445Z.;/8Xj408fV9a7:v$N#cj_WNW7p#t9:](i?S!}yg*D4u$RfpU=}=@Ft^v7$N5O?8eeN%.bT:Q>+AOd3E*R/1PXq.IO,ur3h<`dS)V;e/lj6q'p4s|m>fkk<!jx`EGU~38(0h!(I6P.<[G;m_c^x{kE^hYQUV9kIiS'T:GDRQz -ISW6@cLKz4!e&8LT]kH3'Hj=Zl]rEOyrXlmfG51.K1(5l{:GPb1PL5%.gMmLy;pU3h+zDxpSn@)nJ*#'EOt=Pt.t9z,;D.[r|Prpeu=0%WN+A~KSb(E:gd%o2QfB_K-!xLAN+jXicd**bk'WDq,ue&z]Rb>;DBCFif{zJEDfx3FKqB*?2Qti:(pYSa-uZU,M!^N =bRbZ`}j}P-u-n>lGH|pv>#r"}Eg&c6J&fi.IC@2:L""",94,10)[1:]
e=D.Draw(i)
for X in range(0,len(K),21):
    y=K[X:X+21];x=[]
    for z in range(0,21,3):x+=[int(y[z:z+3])]
    e.rectangle((x[0],x[1],x[2],x[3]),(x[4],x[5],x[6]))
i=i.filter(F.GaussianBlur(radius=5))
i.save('2.png')

enter image description here

Python 3, score 5390.25, 998 bytes##

I used a simulated annealing program to fit rectangles into the shape of Starry Night. Then it uses a Gaussian blur to smooth out the straight rectangular edges.

To save some bytes, I compressed the rectangle data into base 94.

from PIL import Image as I,ImageDraw as D,ImageFilter as F
def V(n,f,t):
    z=0;s='';d='''0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!@#$%^&*()_-+={[}]|:;"',<.>/?`~ '''
    for i in n:z=z*f+d.index(i)
    while z:z,m=divmod(z,t);s=d[m]+s
    return s
i=I.new('RGB',(386,320))
K=V("""12XsPc/p^m(:,enp:SN8brwj%!iChDHKj"*445Z.;/8Xj408fV9a7:v$N#cj_WNW7p#t9:](i?S!}yg*D4u$RfpU=}=@Ft^v7$N5O?8eeN%.bT:Q>+AOd3E*R/1PXq.IO,ur3h<`dS)V;e/lj6q'p4s|m>fkk<!jx`EGU~38(0h!(I6P.<[G;m_c^x{kE^hYQUV9kIiS'T:GDRQz -ISW6@cLKz4!e&8LT]kH3'Hj=Zl]rEOyrXlmfG51.K1(5l{:GPb1PL5%.gMmLy;pU3h+zDxpSn@)nJ*#'EOt=Pt.t9z,;D.[r|Prpeu=0%WN+A~KSb(E:gd%o2QfB_K-!xLAN+jXicd**bk'WDq,ue&z]Rb>;DBCFif{zJEDfx3FKqB*?2Qti:(pYSa-uZU,M!^N =bRbZ`}j}P-u-n>lGH|pv>#r"}Eg&c6J&fi.IC@2:L""",94,10)[1:]
e=D.Draw(i)
for X in range(0,len(K),21):
    y=K[X:X+21];x=[]
    for z in range(0,21,3):x+=[int(y[z:z+3])]
    e.rectangle((x[0],x[1],x[2],x[3]),(x[4],x[5],x[6]))
i=i.filter(F.GaussianBlur(radius=5))
i.save('2.png')

enter image description here

Python 3, score 5390.25, 998 bytes

I used a simulated annealing program to fit rectangles into the shape of Starry Night. Then it uses a Gaussian blur to smooth out the straight rectangular edges.

To save some bytes, I compressed the rectangle data into base 94.

from PIL import Image as I,ImageDraw as D,ImageFilter as F
def V(n,f,t):
    z=0;s='';d='''0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!@#$%^&*()_-+={[}]|:;"',<.>/?`~ '''
    for i in n:z=z*f+d.index(i)
    while z:z,m=divmod(z,t);s=d[m]+s
    return s
i=I.new('RGB',(386,320))
K=V("""12XsPc/p^m(:,enp:SN8brwj%!iChDHKj"*445Z.;/8Xj408fV9a7:v$N#cj_WNW7p#t9:](i?S!}yg*D4u$RfpU=}=@Ft^v7$N5O?8eeN%.bT:Q>+AOd3E*R/1PXq.IO,ur3h<`dS)V;e/lj6q'p4s|m>fkk<!jx`EGU~38(0h!(I6P.<[G;m_c^x{kE^hYQUV9kIiS'T:GDRQz -ISW6@cLKz4!e&8LT]kH3'Hj=Zl]rEOyrXlmfG51.K1(5l{:GPb1PL5%.gMmLy;pU3h+zDxpSn@)nJ*#'EOt=Pt.t9z,;D.[r|Prpeu=0%WN+A~KSb(E:gd%o2QfB_K-!xLAN+jXicd**bk'WDq,ue&z]Rb>;DBCFif{zJEDfx3FKqB*?2Qti:(pYSa-uZU,M!^N =bRbZ`}j}P-u-n>lGH|pv>#r"}Eg&c6J&fi.IC@2:L""",94,10)[1:]
e=D.Draw(i)
for X in range(0,len(K),21):
    y=K[X:X+21];x=[]
    for z in range(0,21,3):x+=[int(y[z:z+3])]
    e.rectangle((x[0],x[1],x[2],x[3]),(x[4],x[5],x[6]))
i=i.filter(F.GaussianBlur(radius=5))
i.save('2.png')

enter image description here

added 88 characters in body
Source Link
Magenta
  • 1.4k
  • 10
  • 12

Python 3, score 55215390.2725, 919998 bytes##

I used a simulated annealing program to fit rectangles into the shape of Starry Night. Then it uses a Gaussian blur to smooth out the straight rectangular edges.

To save some bytes, I compressed the rectangle data into base 94.

from PIL import Image as I,ImageDraw as D,ImageFilter as F
def V(n,f,t):
    z=0;s='';d='''0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!@#$%^&*()_-+={[}]|:;"',<.>/?`~ '''
    for i in n:z=z*f+d.index(i)
    while z:z,m=divmod(z,t);s=d[m]+s
    return s
i=I.new('RGB',(386,320))
K=V("""Ol]7~sd!^AoxYp=yA9>53g&<x]UJLKH_85c?Z-x5 o~"""12XsPc/p^m(:,PS5#>enp:SN8brwj%!iChDHKj"*445Z.;Q_lj9%IZ*`f_ih[8Y(Y9|BS4DgR+rdnF)B)r@B2HNg~8#~|kKev`9$m&j$Wr/;/{P8Xj408fV9a7:a0)a7iO7'v$N#cj_WNW7p#t9:}%I0<dvMity](i?S!}PIhxs3C^g>$yg*D4u$RfpU=}ri=@Ft^v7$N5O?y30vm=YO-U*X$VeTD)bT9^x)8LPj^b0jC_O^$@L9)Mp7-@hX%]sn`hvNL>uZG8eeN%.bT:Q>+AOd3E*R/1PXq.IO,ur3h<`dS)3*=V;e/lj6q'p4s|m>fkk<!T6$zDjx`EGU~38(0h!k Y;H:m"j^3(08Q[z<1/VDprbV14}0FJ6>vjGpY8ly~;P%@6QjI6P.<[G;m_c^x{6>I1=2s<F;/kE^hYQUV9kIiS'T:GDRQz -ISW6@cLKz4!e&8LT]kH3'Hj=Zl]rEOyrXlmfG51.K1(fnM=D3Zqx5l{:GPb1PL5%.GS"z]7[4*ZTJXnz>~J;YgMmLy;pU3h+zDxpSn@)nJ*#'EOt=Pt.t9z,;D.[r|Prpeu=0%WN+A~KSb(<E:gd%o2QfB_K-;QjM}fCRovMiaR3Mp!WUy"^{pxLAN+jXicd**bk'WDq,ue&z]Rb>;DBCFif{kQ~U;eY40=P=h_"""zJEDfx3FKqB*?2Qti:(pYSa-uZU,M!^N =bRbZ`}j}P-u-n>lGH|pv>#r"}Eg&c6J&fi.IC@2:L""",94,10)[1:]
e=D.Draw(i)
for X in range(0,len(K),21):
    y=K[X:X+21];x=[]
    for z in range(0,21,3):x+=[int(y[z:z+3])]
    e.rectangle((x[0],x[1],x[2],x[3]),(x[4],x[5],x[6]))
i=i.filter(F.GaussianBlur(radius=5))
i.save('2.png')

enter image description hereenter image description here

Python 3, score 5521.27, 919 bytes##

I used a simulated annealing program to fit rectangles into the shape of Starry Night. Then it uses a Gaussian blur to smooth out the straight rectangular edges.

To save some bytes, I compressed the rectangle data into base 94.

from PIL import Image as I,ImageDraw as D,ImageFilter as F
def V(n,f,t):
    z=0;s='';d='''0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!@#$%^&*()_-+={[}]|:;"',<.>/?`~ '''
    for i in n:z=z*f+d.index(i)
    while z:z,m=divmod(z,t);s=d[m]+s
    return s
i=I.new('RGB',(386,320))
K=V("""Ol]7~sd!^AoxYp=yA9>53g&<x]UJLKH_85c?Z-x5 o~,PS5#>.;Q_lj9%IZ*`f_ih[8Y(Y9|BS4DgR+rdnF)B)r@B2HNg~8#~|kKev`9$m&j$Wr//{P:a0)a7iO7':}%I0<dvMity}PIhxs3C^g>$}ri?y30vm=YO-U*X$VeTD)bT9^x)8LPj^b0jC_O^$@L9)Mp7-@hX%]sn`hvNL>uZG)3*=!T6$zD!k Y;H:m"j^3(08Q[z<1/VDprbV14}0FJ6>vjGpY8ly~;P%@6Qj{6>I1=2s<F;/(fnM=D3Zqx.GS"z]7[4*ZTJXnz>~J;Y.(<-;QjM}fCRovMiaR3Mp!WUy"^{p{kQ~U;eY40=P=h_""",94,10)[1:]
e=D.Draw(i)
for X in range(0,len(K),21):
    y=K[X:X+21];x=[]
    for z in range(0,21,3):x+=[int(y[z:z+3])]
    e.rectangle((x[0],x[1],x[2],x[3]),(x[4],x[5],x[6]))
i=i.filter(F.GaussianBlur(radius=5))
i.save('2.png')

enter image description here

Python 3, score 5390.25, 998 bytes##

I used a simulated annealing program to fit rectangles into the shape of Starry Night. Then it uses a Gaussian blur to smooth out the straight rectangular edges.

To save some bytes, I compressed the rectangle data into base 94.

from PIL import Image as I,ImageDraw as D,ImageFilter as F
def V(n,f,t):
    z=0;s='';d='''0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!@#$%^&*()_-+={[}]|:;"',<.>/?`~ '''
    for i in n:z=z*f+d.index(i)
    while z:z,m=divmod(z,t);s=d[m]+s
    return s
i=I.new('RGB',(386,320))
K=V("""12XsPc/p^m(:,enp:SN8brwj%!iChDHKj"*445Z.;/8Xj408fV9a7:v$N#cj_WNW7p#t9:](i?S!}yg*D4u$RfpU=}=@Ft^v7$N5O?8eeN%.bT:Q>+AOd3E*R/1PXq.IO,ur3h<`dS)V;e/lj6q'p4s|m>fkk<!jx`EGU~38(0h!(I6P.<[G;m_c^x{kE^hYQUV9kIiS'T:GDRQz -ISW6@cLKz4!e&8LT]kH3'Hj=Zl]rEOyrXlmfG51.K1(5l{:GPb1PL5%.gMmLy;pU3h+zDxpSn@)nJ*#'EOt=Pt.t9z,;D.[r|Prpeu=0%WN+A~KSb(E:gd%o2QfB_K-!xLAN+jXicd**bk'WDq,ue&z]Rb>;DBCFif{zJEDfx3FKqB*?2Qti:(pYSa-uZU,M!^N =bRbZ`}j}P-u-n>lGH|pv>#r"}Eg&c6J&fi.IC@2:L""",94,10)[1:]
e=D.Draw(i)
for X in range(0,len(K),21):
    y=K[X:X+21];x=[]
    for z in range(0,21,3):x+=[int(y[z:z+3])]
    e.rectangle((x[0],x[1],x[2],x[3]),(x[4],x[5],x[6]))
i=i.filter(F.GaussianBlur(radius=5))
i.save('2.png')

enter image description here

added 92 characters in body
Source Link
Magenta
  • 1.4k
  • 10
  • 12

Python 3, score 59525521.2927, 919 bytes##

I used a simulated annealing program to fit rectangles into the shape of Starry Night. Then it uses a Gaussian blur to smooth out the straight rectangular edges.

To save some bytes, I compressed the rectangle data into base 94.

from PIL import Image as I,ImageDraw as D, ImageFilter as F
def V(n,f,t):
    z=0;s='';d='''0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!@#$%^&*()_-+={[}]|:;"',<.>/?`~ '''
    for i in n:z=z*f+d.index(i)
    while z:z,m=divmod(z,t);s=d[m]+s
    return s
i=I.new('RGB',(386,320))
K=[[0,319,385,0,47,53,64],[58,26,0,234,97,123,147],[176,318,47,122,31,35,32],[385,130,72,0,64,80,124],[351,53,84,189,82,104,136],[384,207,326,267,76,92,101],[310,163,385,14,145,164,156],[160,262,325,205,52,69,93],[319,199,130,75,95,121,149],[384,198,334,227,83,106,158],[76,78,384,123,82,109,147],[248,17,216,40,127,142,120]K=V("""Ol]7~sd!^AoxYp=yA9>53g&<x]UJLKH_85c?Z-x5 o~,[325PS5#>.;Q_lj9%IZ*`f_ih[8Y(Y9|BS4DgR+rdnF)B)r@B2HNg~8#~|kKev`9$m&j$Wr//{P:a0)a7iO7':}%I0<dvMity}PIhxs3C^g>$}ri?y30vm=YO-U*X$VeTD)bT9^x)8LPj^b0jC_O^$@L9)Mp7-@hX%]sn`hvNL>uZG)3*=!T6$zD!k Y;H:m"j^3(08Q[z<1/VDprbV14}0FJ6>vjGpY8ly~;P%@6Qj{6>I1=2s<F;/(fnM=D3Zqx.GS"z]7[4*ZTJXnz>~J;Y.(<-;QjM}fCRovMiaR3Mp!WUy"^{p{kQ~U;eY40=P=h_""",94,374,23,171,182,130],[126,233,330,213,52,70,116],[334,36,370,76,187,160,39],[109,216,215,187,108,130,137],[369,39,347,64,186,188,128],[152,176,104,144,104,134,164],[108,151,148,190,167,174,158],[257,85,284,63,144,155,137],[11,2,46,28,128,144,132],10)[1,317,59,320,138,136,91],[0,27,58,82,56,74,135],[170,56,229,118,95,117,151]]:]
e=D.Draw(i)
for xX in range(0,len(K),21):
    x=K[x]y=K[X:X+21];x=[]
    for z in range(0,21,3):x+=[int(y[z:z+3])]
    e.rectangle((x[0],x[1],x[2],x[3]),(x[4],x[5],x[6]))
i=i.filter(F.GaussianBlur(radius=2.4radius=5))
i.save('2.png')

enter image description hereenter image description here

Python 3, score 5952.29, 919 bytes##

I used a simulated annealing program to fit rectangles into the shape of Starry Night. Then it uses a Gaussian blur to smooth out the straight rectangular edges.

from PIL import Image as I,ImageDraw as D, ImageFilter as F
i=I.new('RGB',(386,320))
K=[[0,319,385,0,47,53,64],[58,26,0,234,97,123,147],[176,318,47,122,31,35,32],[385,130,72,0,64,80,124],[351,53,84,189,82,104,136],[384,207,326,267,76,92,101],[310,163,385,14,145,164,156],[160,262,325,205,52,69,93],[319,199,130,75,95,121,149],[384,198,334,227,83,106,158],[76,78,384,123,82,109,147],[248,17,216,40,127,142,120],[325,94,374,23,171,182,130],[126,233,330,213,52,70,116],[334,36,370,76,187,160,39],[109,216,215,187,108,130,137],[369,39,347,64,186,188,128],[152,176,104,144,104,134,164],[108,151,148,190,167,174,158],[257,85,284,63,144,155,137],[11,2,46,28,128,144,132],[1,317,59,320,138,136,91],[0,27,58,82,56,74,135],[170,56,229,118,95,117,151]]
e=D.Draw(i)
for x in range(0,len(K)):
    x=K[x]
    e.rectangle((x[0],x[1],x[2],x[3]),(x[4],x[5],x[6]))
i=i.filter(F.GaussianBlur(radius=2.4))
i.save('2.png')

enter image description here

Python 3, score 5521.27, 919 bytes##

I used a simulated annealing program to fit rectangles into the shape of Starry Night. Then it uses a Gaussian blur to smooth out the straight rectangular edges.

To save some bytes, I compressed the rectangle data into base 94.

from PIL import Image as I,ImageDraw as D,ImageFilter as F
def V(n,f,t):
    z=0;s='';d='''0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!@#$%^&*()_-+={[}]|:;"',<.>/?`~ '''
    for i in n:z=z*f+d.index(i)
    while z:z,m=divmod(z,t);s=d[m]+s
    return s
i=I.new('RGB',(386,320))
K=V("""Ol]7~sd!^AoxYp=yA9>53g&<x]UJLKH_85c?Z-x5 o~,PS5#>.;Q_lj9%IZ*`f_ih[8Y(Y9|BS4DgR+rdnF)B)r@B2HNg~8#~|kKev`9$m&j$Wr//{P:a0)a7iO7':}%I0<dvMity}PIhxs3C^g>$}ri?y30vm=YO-U*X$VeTD)bT9^x)8LPj^b0jC_O^$@L9)Mp7-@hX%]sn`hvNL>uZG)3*=!T6$zD!k Y;H:m"j^3(08Q[z<1/VDprbV14}0FJ6>vjGpY8ly~;P%@6Qj{6>I1=2s<F;/(fnM=D3Zqx.GS"z]7[4*ZTJXnz>~J;Y.(<-;QjM}fCRovMiaR3Mp!WUy"^{p{kQ~U;eY40=P=h_""",94,10)[1:]
e=D.Draw(i)
for X in range(0,len(K),21):
    y=K[X:X+21];x=[]
    for z in range(0,21,3):x+=[int(y[z:z+3])]
    e.rectangle((x[0],x[1],x[2],x[3]),(x[4],x[5],x[6]))
i=i.filter(F.GaussianBlur(radius=5))
i.save('2.png')

enter image description here

deleted 20 characters in body, added picture
Source Link
Magenta
  • 1.4k
  • 10
  • 12
Loading
added 137 characters in body
Source Link
Magenta
  • 1.4k
  • 10
  • 12
Loading
added 144 characters in body
Source Link
Magenta
  • 1.4k
  • 10
  • 12
Loading
added 11 characters in body
Source Link
Magenta
  • 1.4k
  • 10
  • 12
Loading
Source Link
Magenta
  • 1.4k
  • 10
  • 12
Loading