Win a copy of Succeeding with AI this week in the Artificial Intelligence and Machine Learning forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
  • Junilu Lacar
Sheriffs:
  • Tim Cooke
  • Jeanne Boyarsky
  • Knute Snortum
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:
  • salvin francis
  • fred rosenberger
  • Frits Walraven

Ascii drawings

 
Saloon Keeper
Posts: 3919
154
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ascii drawings.

I just bought the book "Opt Art" by the mathematician Robert Bosch. This book is about linear optimizations and how to apply it to images. Just finished chapter 1 about Truchet tiles, and there were some great looking examples about transforming black and white pictures.

While thinking about a way to implement all of this, I was experimenting with BufferedImages that are NOT of the standard type 'ínt_argb'. Especially the types "byte_indexed" and "byte_binary" are fun to work with. For instance, to see some kerning and anti-aliasing taking place, here is a little example:
 
Saloon Keeper
Posts: 6391
158
Android Mac OS X Firefox Browser VI Editor Tomcat Server Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I found the attached article in the depths of my hard drive. I have no idea where I got it from, probably java.net way back in 2004. It seems spot on for this topic.
Filename: Ascii-Art-with-Java2D.html
File size: 22 Kbytes
 
Piet Souris
Saloon Keeper
Posts: 3919
154
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks, Tim!  Never worked with Glyphvectors before, fine opportunity to learn something.

And before I get accused: I didn't know this article.
 
Marshal
Posts: 69035
275
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bosch? Not Hieronymus, then?
 
Piet Souris
Saloon Keeper
Posts: 3919
154
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hieronymus wishes he was!

But having a byte_indexed BufferedImage and manipulating the colors can give some very nice effects indeed. I could not find an easy way to do that, by the way. But there's bound to be material on the Internet or on someones hard disk that shows how to do it the easy way. But, as said, interesting stuff.
 
When all four tires fall off your canoe, how many tiny ads does it take to build a doghouse?
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic