You are browsing as a guest. Sign up (or log in) to start making projects!

ascii image thing

  • 3 Devlogs
  • 12 Total hours

Image to layered ASCII in cyan, magenta, and yellow.

Open comments for this post

5h 43m 28s logged

Basic image editor

I’ve implemented a vector drawing editor with smooth curves and pressure sensitivity, and I created a worker to process the updated canvas after every stroke to convert it into glyphs.

I intend to implement color support and layers later.

I want the glyph rendering to be real-time, so I have a lot of optimization work to do.

The video looks a bit choppy because I’m using a tablet laptop that has a very low detection range for its drawing pen. So the cursor teleports.

0
0
1
Open comments for this post

1h 25m 11s logged

Refactor for speed

Initially, I attempted using kd-trees like I mentioned before. But that led to what felt like at 50x slower execution. So I just sat for a few minutes, staring at the code.

Then I realized the three separate color channels didn’t have to be linked together… so I refactored the logic to compute the channels separately, and now it’s running over 240x faster than the original.

For the Stardance logo (with the outline I added), it went from taking 290.9 seconds to only 1.2, with what looks like the same output.

I need to stop overthinking things.

I also realized I was calculating the width of a character without applying the correct font size. Things don’t warp anymore.

0
0
5
Open comments for this post

4h 42m 28s logged

I was inspired by the typewriter’s inability to erase, and subtractive color mixing.

Now I have a program that generates three layers of stacked ASCII in cyan, magenta, and yellow, to replicate an image.

It generates very slowly at the moment–every character requires checking against 857,375 patterns to find the best fit. My plan is to use a kd-tree to reduce that to about 20 matches instead.

I also have to figure out why the images are squished vertically (or stretched horizontally).

0
0
1

Delete project?

Are you sure you want to permanently delete this project? This action cannot be undone.

All devlogs, followers, and associated data will be removed.

Followers

Loading…