• 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
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Ascii drawings

 
Bartender
Posts: 4066
156
  • 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: 6588
160
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
Bartender
Posts: 4066
156
  • 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: 70223
282
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bosch? Not Hieronymus, then?
 
Piet Souris
Bartender
Posts: 4066
156
  • 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.
 
Do the next thing next. That’s a pretty good rule. Read the tiny ad, that’s a pretty good rule, too.
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