Bitmap tracer
Yesterday Oldes released nice program, bitmap tracer. ( http://box.lebeda.ws/~hmm/rebol/projects/vectorize/latest/vectorize.r ). It's written in rebcode and the algorythm is his own, not a implementation. He's using it for converting bitmap fonts to vector ones for usage in his REBOL/Flash dialect. And because it's Oldes, the usage is somehow tricky :)
do http://box.lebeda.ws/~hmm/rebol/projects/vectorize/latest/vectorize.r
probe vectorize http://box.lebeda.ws/~hmm/rebol/projects/vectorize/latest/img41.gif
If you try that code you can see result is not very REBOLish, a block of numbers. It's the coordinates in [x y x y ...] format, because rebcode cannot handle pair!. Erhm, pardon, rebcode cannot handle pair! ??
>> a: rebcode [x][pick y x 1 print y]
>> a 1x1
1
Seems it can :) Oldes has separate function for conversion of his row of numbers to pair! so usage seems like that:
probe ctx-vectorize/to-pairs vectorize http://box.lebeda.ws/~hmm/rebol/projects/vectorize/latest/img41.gif
Yes, great. Unfortunately, the result is somehow scaled and shifted, so somebody should correct 'vectorize function to support pairs or correct 'to-pairs function not to shift and scale result.
But these are just minor problems, they're result of Oldes' coding style. The main thing is that it's now possible to natively convert bitmap images to vectors. And that's great!
64 comments:
M5QxiL write more, thanks.
Good job!
Wonderful blog.
Good job!
Thanks to author.
actually, that's brilliant. Thank you. I'm going to pass that on to a couple of people.
Please write anything else!
Magnific!
actually, that's brilliant. Thank you. I'm going to pass that on to a couple of people.
Hello all!
Magnific!
Please write anything else!
Wonderful blog.
What is a free gift ? Aren't all gifts free?
actually, that's brilliant. Thank you. I'm going to pass that on to a couple of people.
Lottery: A tax on people who are bad at math.
All generalizations are false, including this one.
Oops. My brain just hit a bad sector.
When there's a will, I want to be in it.
C++ should have been called B
Save the whales, collect the whole set
When there's a will, I want to be in it.
The gene pool could use a little chlorine.
Suicidal twin kills sister by mistake!
Please write anything else!
Change is inevitable, except from a vending machine.
A flashlight is a case for holding dead batteries.
Give me ambiguity or give me something else.
The gene pool could use a little chlorine.
Ever notice how fast Windows runs? Neither did I.
Clap on! , Clap off! clap@#&$NO CARRIER
Thanks to author.
Beam me aboard, Scotty..... Sure. Will a 2x10 do?
Suicidal twin kills sister by mistake!
Oops. My brain just hit a bad sector.
640K ought to be enough for anybody. - Bill Gates 81
All generalizations are false, including this one.
When there's a will, I want to be in it.
When there's a will, I want to be in it.
Give me ambiguity or give me something else.
What is a free gift ? Aren't all gifts free?
Oops. My brain just hit a bad sector.
Calvin, we will not have an anatomically correct snowman!
What is a free gift ? Aren't all gifts free?
Build a watch in 179 easy steps - by C. Forsberg.
The gene pool could use a little chlorine.
actually, that's brilliant. Thank you. I'm going to pass that on to a couple of people.
What is a free gift ? Aren't all gifts free?
Friends help you move. Real friends help you move bodies.
actually, that's brilliant. Thank you. I'm going to pass that on to a couple of people.
640K ought to be enough for anybody. - Bill Gates 81
I'm not a complete idiot, some parts are missing!
Lottery: A tax on people who are bad at math.
If ignorance is bliss, you must be orgasmic.
The gene pool could use a little chlorine.
Give me ambiguity or give me something else.
If ignorance is bliss, you must be orgasmic.
Friends help you move. Real friends help you move bodies
Wonderful blog.
I don't suffer from insanity. I enjoy every minute of it.
A lot of people mistake a short memory for a clear conscience.
The gene pool could use a little chlorine.
Thanks to author.
Give me ambiguity or give me something else.
Post a Comment