Draw a trololologram

2

2

Your challenge here is to draw a trololologram.

You can choose any language.

The answer with more upvotes and the one that exploits more holes wins.

Rules for valid answers:

  • You can't use any network resource or external file (except the source-code)
  • You can't post someone else's answer
  • You can't have it stored in any image format or pre-rendered (including base64 data:// uri's and any form of ascii art).
  • You can't store the image in any database.
  • You can't simply print/echo 'trololologram' (case insensitive)
  • Explain your answers and what holes you exploited.
  • The code must render the trolologram on the screen (minimum size of 90x90) and must be with a black border and white background. The rendered version can't "be invisible" or "hidden behind the screen" or similar.
  • The image must show in the screen. It can't output the code to a file or anything similar (/dev/null doesn't count and virtual screens/viewports also don't count).

The main goal is to twist the rules and bend them at your own will and stil render a trololologram on screen.

Have fun!

Ismael Miguel

Posted 2014-02-20T20:11:58.653

Reputation: 6 797

Question was closed 2014-05-09T14:44:29.670

1I believe this challenge is impossible, since all computer generated graphics have to be in some image format, but this is prohibited by the rules. – user12205 – 2014-02-20T21:41:17.443

1@ace OP should clarify but I believes he means that it should be drawn on the fly by the program, not pre-rendered and displayed. – Jason C – 2014-02-20T21:47:26.340

I hope it is more clear now. Sorry for the trouble. – Ismael Miguel – 2014-02-20T22:01:56.543

I think that this challenge is cool. Will think about something for it. – Victor Stafusa – 2014-02-20T22:27:15.857

Thank you. Any questions don't hesitate. And remember: this is code trolling. – Ismael Miguel – 2014-02-20T22:34:58.007

Are image formats that are also markup languages fair game (e.g. SVG)? – Jason C – 2014-02-20T22:58:33.903

No. It's still an image. But it's not hard to twist that to give a valid answer. – Ismael Miguel – 2014-02-20T23:14:24.173

NO! Don't touch the question! – Ismael Miguel – 2014-02-21T00:16:42.410

2The link at the top is in danger of becoming a circular reference, as this page rises up the Google ranks. Which might actually give us a loophole . . . – Neil Slater – 2014-02-21T13:42:10.230

sorry dude but that makes no sense to me... – Ismael Miguel – 2014-02-21T14:01:54.063

@NeilSlater It's already on the first page of results. – ntoskrnl – 2014-02-21T15:01:38.477

5If you create a challenge about trolling and expect serious answers, you're gonna have a bad time... – Nyx – 2014-02-21T18:49:06.593

Code-trolling is in the process of being removed, as per the official stance. This question has a very highly voted answer, recieved over 50% "keep" votes on the poll, and is fairly unique and different than the others, so I am locking it for historical significance.

– Doorknob – 2014-05-11T22:23:36.413

Answers

42

For this challenge, I am posting five programs in this answer, all in Java.

Program 1

You can't simply print/echo 'trololologram' (case insensitive)

public class JustPrintIt {
    public static void main(String[] args) {
        System.out.println("trololologram");
    }
}

Program 2

You can't [...] pre-rendered ([...] and any form of ascii art).

public class AsciiArt {
    public static void main(String[] args) {
        System.out.println(
            "    ########################       \n" +
            "  ##                        #      \n" +
            "  #                          #     \n" +
            " #                            ##   \n" +
            " #                              #  \n" +
            " #                              #  \n" +
            "  #                            #   \n" +
            "  #                          ##    \n" +
            "  #                     #####      \n" +
            "  #            #########           \n" +
            "   ############                    \n");
    }
}

Program 3

You can't use any network resource or external file (except the source-code)

You can't have it stored in any image format or pre-rendered (including base64 data:// uri's [...]).

You can't store the image in any database.

The code must render the trolologram on the screen [...].

The image must show in the screen. It can't output the code to a file [...].

import java.awt.image.BufferedImage;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.IOException;
import java.net.URL;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.SQLException;
import java.util.Base64;
import javax.imageio.ImageIO;

public class DownloadAndStore {
    public static void main(String[] args) throws IOException, ClassNotFoundException, SQLException {
        String url = "http://img171.imageshack.us/img171/8555/trolologramw400.jpg";
        BufferedImage im = ImageIO.read(new URL(url));
        ImageIO.write(im, "png", new File("trolologram.png"));
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        ImageIO.write(im, "png", baos);

        String d = "data://" + new String(Base64.getEncoder().encode(baos.toByteArray()));
        Class.forName("com.mysql.jdbc.Driver");
        try (Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306", "root", "root")) {
            try (PreparedStatement ps = con.prepareStatement("CREATE DATABASE troll")) {
                ps.executeUpdate();
            } catch (SQLException e) {
                if (!e.getMessage().contains("database exists")) throw e;
            }
            try (PreparedStatement ps = con.prepareStatement("CREATE TABLE troll.image (imagedata text not null)")) {
                ps.executeUpdate();
            } catch (SQLException e) {
                if (!e.getMessage().contains("already exists")) throw e;
            }
            try (PreparedStatement ps = con.prepareStatement("INSERT INTO troll.image (imagedata) VALUES (?)")) {
                ps.setString(1, d);
                ps.executeUpdate();
            }
        }
    }
}

Program 4

Your challenge here is to draw a trololologram.

You can't use any network resource or external file (except the source-code)

You can't post someone else's answer

You can't have it stored in any image format or pre-rendered [...].

[...] (minimum size of 90x90) and must be with a black border and white background. [...].

import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.image.BufferedImage;
import java.io.IOException;
import java.net.URL;
import javax.imageio.ImageIO;
import javax.swing.JComponent;
import javax.swing.JFrame;
import javax.swing.SwingUtilities;

public class ShowTheAnswerOfSomebodyElse {
    public static void main(String[] args) throws IOException {

        // See this: http://codegolf.stackexchange.com/a/20085/3755
        String url = "http://placehold.it/99/png&text=Hello+world!";

        BufferedImage im = ImageIO.read(new URL(url));
        BufferedImage im2 = new BufferedImage(89, 89, BufferedImage.TYPE_INT_ARGB);
        im2.createGraphics().drawImage(im, 0, 0, null);
        SwingUtilities.invokeLater(() -> createAndShowGUI(im2));
    }

    private static void createAndShowGUI(BufferedImage im) {
        JFrame frame = new JFrame("");
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

        JComponent panel = new JComponent() {
            @Override
            public Dimension getPreferredSize() {
                return new Dimension(im.getWidth(), im.getHeight());
            }

            @Override
            public Dimension getMinimumSize() {
                return new Dimension(im.getWidth(), im.getHeight());
            }

            @Override
            public Dimension getMaximumSize() {
                return new Dimension(im.getWidth(), im.getHeight());
            }

            @Override
            public void paintComponent(Graphics g) {
                g.drawImage(im, 0, 0, null);
            }
        };
        frame.add(panel);

        frame.pack();
        frame.setVisible(true);
    }
}

Program 5

You can't use any network resource or external file (except the source-code)

You can't have it stored in any image format or pre-rendered [...].

The code must render the trolologram on the screen [...] and must be with a black border and white background. The rendered version can't "be invisible" or [...].

The image must show in the screen. [...].

import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.image.BufferedImage;
import java.io.IOException;
import java.net.URL;
import javax.imageio.ImageIO;
import javax.swing.JComponent;
import javax.swing.JFrame;
import javax.swing.SwingUtilities;

public class ShowTheTrolologramOnScreenButNot {
    public static void main(String[] args) throws IOException {
        String url = "http://img171.imageshack.us/img171/8555/trolologramw400.jpg";
        BufferedImage im = ImageIO.read(new URL(url));
        for (int i = 0; i < im.getHeight(); i++) {
            for (int j = 0; j < im.getWidth(); j++) {
                int rgb = im.getRGB(j, i);
                int r = 255 - (rgb >> 16 & 0xff);
                int g = 255 - (rgb >> 8 & 0xff);
                int b = 255 - rgb & 0xff;
                im.setRGB(j, i, 0xFF000000 + (r << 16) + (g << 8) + b);
            }
        }
        SwingUtilities.invokeLater(() -> createAndShowGUI(im));
    }

    private static void createAndShowGUI(BufferedImage im) {
        JFrame frame = new JFrame("");
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

        JComponent panel = new JComponent() {
            @Override
            public Dimension getPreferredSize() {
                return new Dimension(im.getWidth(), im.getHeight());
            }

            @Override
            public Dimension getMinimumSize() {
                return new Dimension(im.getWidth(), im.getHeight());
            }

            @Override
            public Dimension getMaximumSize() {
                return new Dimension(im.getWidth(), im.getHeight());
            }

            @Override
            public void paintComponent(Graphics g) {
                g.drawImage(im, 0, 0, null);
            }
        };
        frame.add(panel);
        panel.setVisible(false); // :)

        frame.pack();
        frame.setVisible(true);
    }
}

And finally...

Explain your answers and what holes you exploited.

So here it is:

The answer with more upvotes and the one that exploits more holes wins.

There is hole in this: you did not said that it must be a valid answer to be accepted!

Trollface

Victor Stafusa

Posted 2014-02-20T20:11:58.653

Reputation: 8 612

That is not an hole. And yet, you didn't posted one single valid answer. And yes, I didn't, but invalid answers will be ignored. – Ismael Miguel – 2014-02-21T09:22:04.747

4@IsmaelMiguel There is nothing in your question saying that invalid answers can't be accepted and for me, this is a hole (after all, this is code-trolling). So, what I tried was to make my answer the most invalid as I could by intentionally breaking all the rules. – Victor Stafusa – 2014-02-21T11:22:27.317

I know it and I know it. But there is nothing saying that i have to accept invalid answer either. I believe that by being invalid, it's implied that I won't accept it as the correct answer and winner. – Ismael Miguel – 2014-02-21T12:08:11.350

2@IsmaelMiguel Ok. You do not need to accept it (I was not expecting this anyway). But it was quite fun to code something to violate all the rules instead of something to follow all the rules. – Victor Stafusa – 2014-02-21T12:10:47.287

2I accept it as an answer, and I actually though it was a funny answer. But accepting it as a possible winner? Sorry but the answer itself is invalid. But still, you will get +1 from me. – Ismael Miguel – 2014-02-21T12:15:00.880

12

Java 8

Here it is:

You can't use any network resource or external file (except the source-code)

I am reading the source-code.

You can't post someone else's answer

What about someone else's question?

You can't have it stored in any image format or pre-rendered (including base64 data:// uri's and any form of ascii art).

It is indeed not an image format. It is not ascii-art either, since all the characters are the same. It is not pre-rendered either, its source is just english text.

If you insists, this is ascii-art:

/-------\
|       |
| O   O |
|       |
| ----- |
\-------/

This is not ascii-art:

XXXXXXXXX
XXXXXXXXX
XXXXXXXXX
XXXXXXXXX
XXXXXXXXX
XXXXXXXXX

You can't store the image in any database.

It does not, but it saves an SQL's INSERT statement into a file.

You can't simply print/echo 'trololologram' (case insensitive)

Yes, I do not do simply that.

Explain your answers and what holes you exploited.

I am already doing that.

The code must render the trolologram on the screen (minimum size of 90x90) and must be with a black border and white background. The rendered version can't "be invisible" or "hidden behind the screen" or similar.

Indeed it has a minimum size of 90x90.

The image must show in the screen. It can't output the code to a file or anything similar (/dev/null doesn't count and virtual screens/viewports also don't count).

Indeed, it does not outputs code to a file, it outputs something else!


Here, a screenshot:

Screenshot

Here, the code:

import java.awt.Dimension;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import javax.swing.Box;
import javax.swing.BoxLayout;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.SwingConstants;
import javax.swing.SwingUtilities;
import javax.swing.UIManager;

/*
THIS IMAGE IS NOT PRE-RENDERED, I SWEAR THAT!#THIS image is not pre-rendered, i swEAR THAT!#THis IMAGE IS NOT PRE-RENDERED, I SWeAR THAT!#THiS IMAGE IS NOT PRE-RENDERED, I SWEaR THAT!#ThIS IMAGE IS NOT PRE-RENDERED, I SWEAr tHAT!#ThIS IMAGE IS NOT PRE-RENDERED, I SWEAR ThAT!#ThIS IMAGE IS NOT PRE-RENDERED, I SWEAR ThAT!#THiS IMAGE IS NOT PRE-RENDERED, I SWEAR tHAT!#THiS IMAGE IS NOT PRE-RENDERED, I SWEar THAT!#THiS IMAGE IS NOT PRE-RENDEREd, i sweAR THAT!#THiS IMAGE IS NOT Pre-rendereD, I SWEAR THAT!#THIs image is not pRE-RENDERED, I SWEAR THAT!#THIS IMAGE IS NOT PRE-RENDERED, I SWEAR THAT!
*/

public class Trolologram {
    public static void main(String[] args) throws IOException {
        String s = readContents(new File("Trolologram.java"))
                 .replaceAll("\n|\r", "#")
                 .replaceAll("##+", "#")
                 .replaceAll(".*\\Q/" + "*\\E", "")
                 .replaceAll("\\Q*" + "/\\E.*", "");
        String x = createImage(s.substring(1, s.length() - 2));
        System.out.println("'trololologram' (case insensitive)");
        writeContents("'trololologram' (case insensitive)##" + s, new File("database.output"));
        SwingUtilities.invokeLater(() -> {
            UIManager.put("swing.boldMetal", Boolean.FALSE);
            createAndShowGUI(x);
        });
    }

    private static String readContents(File input) throws IOException {
        StringBuilder sb = new StringBuilder((int) input.length());
        try (FileInputStream fis = new FileInputStream(input)) {
            int a;
            while ((a = fis.read()) != -1) {
                sb.append((char) a);
            }
        }
        return sb.toString();
    }

    private static void writeContents(String toWrite, File output) throws IOException {
        try (FileOutputStream fos = new FileOutputStream(output)) {
            for (char c : toWrite.toCharArray()) {
                fos.write(c == '#' ? '\n' : c);
            }
            fos.write('\n');
            fos.write('\n');
            for (char c : toWrite.substring(37).toCharArray()) {
                if (" ,!-".contains("" + c)) continue;
                fos.write(c == '#' ? '\n' : c <= 'Z' ? ' ' : '#');
            }
            fos.write('\n');
            fos.write('\n');
            fos.write(("INSERT INTO troll (imagedata) VALUES ('" + toWrite.substring(37) + "')").getBytes());
        }
    }

    private static String createImage(String s) {
        String[] lines = s.split("#");
        StringBuilder html = new StringBuilder(10000);
        html.append("<html>");
        boolean first = true;
        for (String line : lines) {
            if (first) {
                first = false;
            } else {
                html.append("<br>");
            }
            html.append("<code>");
            for (char c : line.toCharArray()) {
                if (" !,-".contains("" + c)) continue;
                String color = c <= 'Z' ? "white" : "black";
                html.append("<font color=" + color + ">X</font>");
            }
            html.append("</code>");
        }
        return html.toString();
    }

    private static JLabel label(boolean a, String text) {
        JLabel theLabel = new JLabel(text) {
            @Override
            public Dimension getPreferredSize() {
                return new Dimension(a ? 350 : 500, 400);
            }

            @Override
            public Dimension getMinimumSize() {
                return new Dimension(a ? 350 : 500, 400);
            }

            @Override
            public Dimension getMaximumSize() {
                return new Dimension(a ? 350 : 500, 400);
            }
        };
        theLabel.setVerticalAlignment(SwingConstants.CENTER);
        theLabel.setHorizontalAlignment(SwingConstants.CENTER);
        return theLabel;
    }

    private static String Q = "<html>Your challenge here is to draw a <font color='#4e82c2'>trololologram</font>." +
        "<br>" +
        "You can choose any language." +
        "<br>" +
        "The answer with more upvotes and the one that exploits more holes wins." +
        "<br>" +
        "Rules for valid answers:" +
        "<ul>" +
        "<br><li>You can't use any network resource or external file (except the source-code)" +
        "<br><li>You can't post someone else's answer" +
        "<br><li>You can't have it stored in any image format or pre-rendered (including base64 data:// uri's and any form of ascii art)." +
        "<br><li>You can't store the image in any database." +
        "<br><li>You can't simply print/echo 'trololologram' (case insensitive)" +
        "<br><li>Explain your answers and what holes you exploited." +
        "<br><li>The code must render the trolologram on the screen (minimum size of 90x90) and must be with a black border and white background. The rendered version can't \"be invisible\" or \"hidden behind the screen\" or similar." +
        "<br><li>The image must show in the screen. It can't output the code to a file or anything similar (/dev/null doesn't count and virtual screens/viewports also don't count)." +
        "</ul>" +
        "<br>" +
        "The main goal is to twist the rules and bend them at your own will and stil render a trololologram on screen." +
        "<br>" +
        "Have fun!";

    private static void createAndShowGUI(String x) {
        JFrame frame = new JFrame("'trololologram' (case insensitive)");
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

        JPanel panel = new JPanel();
        panel.setLayout(new BoxLayout(panel, BoxLayout.LINE_AXIS));
        panel.add(label(true, x));
        panel.add(Box.createRigidArea(new Dimension(10, 0)));
        panel.add(label(false, Q));
        frame.add(panel);

        frame.pack();
        frame.setVisible(true);
    }
}

Victor Stafusa

Posted 2014-02-20T20:11:58.653

Reputation: 8 612

While this solution is great, I have a strange feeling that you guys have completely nothing to do except coding :) – VisioN – 2014-02-21T00:07:26.700

Can you provide a printscreen of the output? And what is the usefulness of that huge comment? – Ismael Miguel – 2014-02-21T00:12:33.253

1@IsmaelMiguel Done. You can see the usefulness of the comment in the screenshot. – Victor Stafusa – 2014-02-21T00:20:24.723

Quoting my question, the 3rd rule: "You can't have it stored in any image format or pre-rendered (including base64 data:// uri's and any form of ascii art)", and that comment basically is a form of ascii art pre-rendered inside the code. Sorry dude, but that is invalid. BUT you will get a +1 for bending all the rules! – Ismael Miguel – 2014-02-21T00:23:54.563

@IsmaelMiguel Fixed. See in the text of the answer, above, what I am saying about ascii-art. – Victor Stafusa – 2014-02-21T00:28:33.287

1Still a form of ascii art. And it's pre-rendered inside a comment. If you somehow store that info inside an array of numbers, I will count that as a valid answer. But dont make it an array of 1 and 0. Still will count as some sort of ascii art. – Ismael Miguel – 2014-02-21T00:30:26.380

@IsmaelMiguel What about now? I decided to use english text to store the image. – Victor Stafusa – 2014-02-21T01:01:24.550

The pattern is simple: lowercase letters are the outline. Still invalid. – Ismael Miguel – 2014-02-21T01:02:12.760

The reason why the answer is invalid is not because the output resembles ascii art, but because you have the output pre-rendered in a form of ascii art inside a comment. The output can be anything as long as it has the trololologram in black with a white background. – Ismael Miguel – 2014-02-21T01:19:18.980

1@IsmaelMiguel If I put everything in one single line, it is not ascii-art anymore, right? Sorry for insisting, I must find a way to abuse this. – Victor Stafusa – 2014-02-21T01:27:34.603

Technically, no. The pattern is there, but it's not "valid" ascii art. – Ismael Miguel – 2014-02-21T02:02:49.293

@IsmaelMiguel What do you think now? – Victor Stafusa – 2014-02-21T02:08:05.993

3I have to consider it valid. – Ismael Miguel – 2014-02-21T02:50:28.460

2

HTML/JavaScript (with a vengeance)

Since the humorous trollesque approach did not meet with an unadulterated success, here is my hackish JavaScript attempt, complete with its state-of-the-art HTML wrapper:

<script>function _(_,l,I,j){_-=i%$/5;l-=i*(j||.4)/$;return _*_+l*l<I*I/4}l='<pre>';$=90;for(
i=0;i<4e3;i++)l+=i%$?' %'[!(_(6,9,2,.8)|_(13,12,3,1)|_(7,48,5,1.4)|_(10,33,2,1))&(_(5,7,8)|_(
15,7,6)|_(-20,9,74)&_(38,9,72)&_(9,20,40)&_(-8,-10,64))]:'\n';document.write(l)</script>

(linefeeds added for readability)

Should produce something like this:

trololologram

Skeptical people can see a live example here.

EDIT: let's review the rules point per point

You can't use any network resource or external file (except the source-code)

No problem there. You can run a script from within an HTML page directly from your hard disk.

You can't post someone else's answer

Check.

You can't have it stored in any image format or pre-rendered (including base64 data:// uri's and any form of ascii art).

Check.

You can't store the image in any database.

Check, provided the function parameters are not considered part of a database.

You can't simply print/echo 'trololologram' (case insensitive)

I was tempted to use the characters in "trololologram" instead of "%" as a filler, but that would have had an intolerable impact on the size of the program.

The code must render the trolologram on the screen (minimum size of 90x90) and must be with a black border and white background.

Check (you did not specify the interior color).

The rendered version can't "be invisible" or "hidden behind the screen" or similar.

Check.

The image must show in the screen. It can't output the code to a file or anything similar (/dev/null doesn't count and virtual screens/viewports also don't count).

As long as your browser window is not obscured, it's clearly showing the image on the screen. It's your genuine display, no cryptic device or virtual screen or viewport.

Explain your answers and what holes you exploited.

An HTML page, once rendered, is (among other things) an image displayed on the screen.
You can capture it, store it to disk, photoshop it, email it to relatives and friends, print it on genuines bits of dead trees and light a fire with it for all I care, but it's a friggin image.

About the ressemblance with the original trololologram, I do not claim to be an artist. Consider this code as a proof of concept. If someone wants to spend the hour(s) needed to tweak and add more elements to get closer to the original, he/she is welcome to do so.

user16991

Posted 2014-02-20T20:11:58.653

Reputation:

Just one question: where is it rendered as an image? – Ismael Miguel – 2014-02-22T22:49:20.860

I'm not even gonna comment about that. It's a good answer, but I'm not gonna comment about it. – Ismael Miguel – 2014-02-22T23:40:44.430

??? Obfuscation aside, it's just a bit of code drawing a shape based on homotetic circles combinations. I can add a readable version if you want. The remark about MySQL was not meant to be offensive either. I always found DB interfaces tend to produce ungainly code, that's all. And as others have already stated, the question invites a certain amount of trollishness. – None – 2014-02-23T00:03:18.093

I know it does invite trollishness. But I want people to troll, but to follow those rules. – Ismael Miguel – 2014-02-23T00:17:45.997

Come on, the first answer was a bad joke. No offense, but it was. This one is an answer, but it still has lots of things that make it invalid. For example: it doesn't render an image and the accuracy of the trololologram is quite questionable (I didn't said anything about the accuracy in the question). It really is a nice code and almost reaches the goal. But it has to be an image. – Ismael Miguel – 2014-02-23T01:21:42.060

1

Autoit 3 Script

$trol=ASCIIGenerate(4,1,1,0)&ASCIIGenerate(24,0,0,1)&ASCIIGenerate(2,1,1,0)&ASCIIGenerate(2,0,0,0)&ASCIIGenerate(24,1,0,0)&ASCIIGenerate(1,0,0,1)&ASCIIGenerate(2,1,1,0)&ASCIIGenerate(1,0,0,0)&ASCIIGenerate(26,1,0,0)&ASCIIGenerate(1,0,0,1)&ASCIIGenerate(1,1,1,0)&ASCIIGenerate(1,0,0,0)&ASCIIGenerate(28,1,0,0)&ASCIIGenerate(2,0,0,1)&ASCIIGenerate(1,1,1,0)&ASCIIGenerate(1,0,0,0)&ASCIIGenerate(30,1,0,0)&ASCIIGenerate(1,0,0,1)&ASCIIGenerate(1,1,1,0)&ASCIIGenerate(1,0,0,0)&ASCIIGenerate(30,1,0,0)&ASCIIGenerate(1,0,0,1)&ASCIIGenerate(2,1,1,0)&ASCIIGenerate(1,0,0,0)&ASCIIGenerate(28,1,0,0)&ASCIIGenerate(1,0,0,1)&ASCIIGenerate(2,1,1,0)&ASCIIGenerate(1,0,0,0)&ASCIIGenerate(26,1,0,0)&ASCIIGenerate(2,0,0,1)&ASCIIGenerate(2,1,1,0)&ASCIIGenerate(1,0,0,0)&ASCIIGenerate(21,1,0,0)&ASCIIGenerate(5,0,0,1)&ASCIIGenerate(2,1,1,0)&ASCIIGenerate(1,0,0,0)&ASCIIGenerate(12,1,0,0)&ASCIIGenerate(9,0,0,1)&ASCIIGenerate(3,1,1,0)&ASCIIGenerate(12,0,0,1)
RunWait("cmd /C @echo off&color F0&"&$trol&"pause > nul")


Func ASCIIGenerate($num,$char,$echo,$and)
    Local $i=0
    Local $str=""
    If $echo=1 Then
        $str&="echo "
    EndIf
        Do
            Switch $char
                Case 0
                    $str&="#"
                Case 1
                    $str&=" "
            EndSwitch
            $i+=1
        Until $i=$num
    If $and=1 Then
        $str&="&"
    EndIf
    Return $str
EndFunc

Output: enter image description here

Holes exploited:

You can't have it stored in any image format or pre-rendered (including base64 data:// uri's and any form of ascii art).

The ASCII art is generated by the script on the fly. The script itself only has info on which and how many characters it must draw onscreen and when start a new line.

You can't store the image in any database. The image must show in the screen. It can't output the code to a file or anything similar (/dev/null doesn't count and virtual screens/viewports also don't count).

The script doesn't create nor contain any files. When generated, the ASCII art is loaded onto the computer's RAM and then shown via CMD commands (without using any batch files, only cmd /c ).

The code must render the trolologram on the screen (minimum size of 90x90) and must be with a black border and white background. The rendered version can't "be invisible" or "hidden behind the screen" or similar.

The image displayed onscreen is way bigger than 90x90 and it's black on a white background.

user17067

Posted 2014-02-20T20:11:58.653

Reputation: 11

1You didn't exploited any hole. – Ismael Miguel – 2014-02-22T23:43:27.610

Acutally, I did. You said no to any form of pre-rendered ASCII art and still, while the source code in itself doesn't contain any, it still generates and shows it onscreen. That pretty much sounds like a hole to me. – user17067 – 2014-02-23T11:06:27.067

Generating ascii art is totally different from what I meant. – Ismael Miguel – 2014-02-23T19:51:44.073

0

HTML/CSS

<p style='font-size:100px'}>&#x1f606;

😆

You can't have it stored in any image format or pre-rendered (including base64 data:// uri's and any form of ascii art).

Well it's not me that does the rendering, it's the browser.
And there is no ASCII here, only unicode :p.

user16991

Posted 2014-02-20T20:11:58.653

Reputation:

1Is this a serious answer? Or are you trolling? – Ismael Miguel – 2014-02-22T05:16:43.950

Since it's a question about trolling (practically asking to get troll-answers) the trolling in itself does not make this a bad answer (see the other answers). The end result, however, hardly resembles the requested output. So I'd have to guess that's why the downvotes. shrug – Vincent Vancalbergh – 2014-02-22T07:29:54.670

Must be my warped French sense of humor failing to translate or something :)... – None – 2014-02-22T10:49:59.507

1Even would be a better answer. – Ismael Miguel – 2014-02-23T00:12:26.553

0

HTML

Even ○ would be a better answer. – Ismael Miguel Feb 23 at 0:12

Well here it is:

(with the browser zoomed in until it gets 90x90)

Derek 朕會功夫

Posted 2014-02-20T20:11:58.653

Reputation: 199