-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Letter clock effect #74
base: master
Are you sure you want to change the base?
Conversation
palette[21] = color(#00ff00); | ||
|
||
// Experimental code: | ||
String lines[] = loadStrings("background.txt"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't you load the image directly and process it in a function? I don't want to keep in the repository intermediate conversion steps in obscure file format.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
background.txt
is just a result of conversion with PNG2C with C-specific parts stripped. I wanted to use OCS for the prototype to be as "Amiga-like" as possible but AFAIK the image conversion code was not adapted for Processing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess you could easily write a function that reads in PNG image and produces an array of bitplanes and a palette. That could be of great value for other people using ocs.pde
for prototyping!
palette[21] = color(#00ff00); | ||
|
||
// Experimental code: | ||
String lines[] = loadStrings("background.txt"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess you could easily write a function that reads in PNG image and produces an array of bitplanes and a palette. That could be of great value for other people using ocs.pde
for prototyping!
@@ -0,0 +1,11 @@ | |||
Converting the SVG to proper PNG is as follows: | |||
|
|||
Use InkScape 1.0 or newer and export PNG with antialiasing DISABLED |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have major problems reproducing clock-bg.png
from background.svg
file. I failed to do so using method you described in this file. Most likely it's due to use of fonts that are present only in your installation of system. Please list fonts with URLs (so I can fetch them) that are required by this file.
@@ -0,0 +1,9 @@ | |||
0b1000 0b10000 0b11000 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess it'd be easier if you use csv
file format - then you'd get parser for free. Please note you can use space as a separator. For clarity I'd add two words in the first line: orig
and target
.
lens_tab = [int(lens, base=2) for lens in f.readline().split()] | ||
for line in f: | ||
colour_line = [ | ||
[ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great opportunity to write small function that performs the task of constructing RGB color from string.
@@ -0,0 +1,57 @@ | |||
final int bitplane_n = 5; | |||
final int plane_size = 320*256; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd pleased to see more named values instead of magic constants ;-)
No description provided.