Visual Basic Sucks!
That’s all I have to say!
Posted in Coding Voodoo | No Comments »
That’s all I have to say!
Posted in Coding Voodoo | No Comments »
A few months ago, I decided to write a “quick” introduction to the LAB color space.
But instead of just writing the “hey! look, I can increase the luminosity of my image without losing color information”-type of post, I decided to get intimate with LAB and make the fuzzier concepts (the A and the B) a bit easier to understand using practical examples.
The reason why I still haven’t written more about LAB is simple. I got hooked! The more I read about LAB the more I am intrigues by the possibilities and the more I read about it. It’s a vicious circle.
I am now working on my 3rd attempt of the first example (yes, the usual-luminosity-suspect 😉 ) and I am still not quite satisfied. My recent discovery is how stupidly easy one can fix a color-cast in an image with LAB. With this technique you can even get rid of light fog or haze.
However, creating, and annotating, the example images is very time-consuming. And until end of summer I am still very busy, so I will have to postpone my posts a few months 😐
Stay tuned!
Posted in Photo Voodoo | No Comments »
My preferred way to deploy python applications on Windows is to use py2exe.
py2exe is a Python Distutils extension which converts Python scripts into executable Windows programs, able to run without requiring a Python installation.
If you run in trouble with sip, read on…
Read the rest of this entry »
Posted in Python | 1 Comment »
Writing Qt apps in Python with Qt3 worked. Somewhat. I never found the energy to get it all set up. Finally with Qt4 we have something that “just works”. At least on Ubuntu and Windows (haven’t tested anywhere else).
Yes, since version 4, trolltech finally decided to release Qt as well under the GPL. To most of you it’s all old news. But hey…. just felt like writing it down again 😉
The problems with SIP are finally gone. So you just install python, Qt4 and pyqt4 and off you go.
Posted in Python | No Comments »
The LAB color space offers some very powerful ways to manipulate the coloring of a photo. With a little bit of imagination, one can achieve very interesting results even. I am currently working on some examples but it’s not all finished yet.
The examples are done in The Gimp! It should also be possible to adapt those examples to Adobe Photoshop as it also supports the LAB colorspace. Details may vary though.
A boring example of brightening up an image will follow soon.
To get you started:
0 <= L <= 100
-128 <= A <= 128
-128 <= B <= 128
L denotes the lightness such that 0 is black and 100 is white.
A separates magenta/red and green such that -128 is green, 0 is neither red nor green and 128 is red.
B separates cyan/blue and yellow such that -128 is cyan, 0 is neither cyan nor yellow, and 128 is yellow
A fun fact: With LAB you can specify impossible colors. Let’s say, you can crank up B to the maximum positive value, to obtain yellow. What happens if you reduce the L-value? Well it becomes “dark-yellow” which does not exist. Dark-Yellow looks brown to the human eye. Yet you can specify it. The same way you can specify “bright-green”.
Posted in Photo Voodoo | No Comments »
PostgreSQL offers the very interesting module ltree. It’s used to represent a tree structure within the database. One could represent a tree quite easily as a table which references itself. However, if you ever went along that road, you will know that it becomes very slow with larger trees. In addition, the SQL queries that reference themselves are very unhandy.
If you want to know more, what ltree can do for you, I suggest you go ahead and read the usage examples on the ltree homepage.
This is the part that eluded me. On the homepage it only states:
cd contrib/ltree make make install make installcheck
Posted in Coding Voodoo | 2 Comments »
Currently I am a bit busy, so I will just dump the post I found on usenet. Eventually I will clean it up…
On Wed, 22 Oct 2003 12:24:42 -0600 "Justin Johnson" <justinjohnson@fastmail.fm> wrote: > The general consensus on the mailing list archives seems to be that > I'd need to setup my code to not require twistd but just run > standalone. Uh. *Maybe* that's the consensus, but it's not actually correct. You can have a tap or tac run as a NT service. Lets say you have a script "server.py" that is runnable with "twistd -y", you can do (and similar code will work for TAPs):
-- Itamar Shtull-Trauring http://itamarst.org/ Available for Python & Twisted consulting
Posted in Python | No Comments »