Grasshopper

algorithmic modeling for Rhino

I am attempting to import a .txt file into grasshopper. The .txt file itself is comprised of many different types of character glyphs. Grasshopper is having trouble representing such glyphs. The glyphs are often translated to question mark symbols.

For example, the first characters of a .txt file are as follows:

ÿØÿà JFIF

This is represented in grasshopper as:

���� JFIF

I am wondering if am able to import a .txt file without getting any translation errors. Does anyone have any advice or work-arounds?

 

For clarity, I am attempting to alter a .txt files contents to create “glitch art”. I would like to parametrically alter a jpeg image by importing it into grasshopper through a .txt file.  The altered content is then resaved as a .txt file (from a panel). Finally I manually save that newly deformed .txt as a .jpg. If done correctly the .jpg will be a unique deformation of the original image I began with. More information on the subject can be found here:

http://en.wikipedia.org/wiki/Glitch_art

http://blogs.loc.gov/digitalpreservation/2012/11/glitching-files-fo...

 

 I have attached:

.gh file

.png of the workspace

.txt that is imported into grasshopper.

Any help will be greatly appreciated!

Brent

Views: 778

Attachments:

Replies to This Discussion

It'll depend on the encoding. It seems that parsing that file with UTF8 doesn't work. 

I attached a C# script which reads a textfile with a specific Encoding. UTF7 works on that file you posted.

--

David Rutten

david@mcneel.com

Poprad, Slovakia

Attachments:

Thanks David! I'll try this out when i get back to my station. I appreciate the help.

Incidentally, if you're trying to read EXIF image header data, there may be better ways than parsing the image as text.

--

David Rutten

david@mcneel.com

Poprad, Slovakia

David - do you know a good way to read EXIF data from a jpg or png image? 

I do not. If you want to find out the good folk at StackOverflow.com will probably be able to help you out though.

--

David Rutten

david@mcneel.com

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service