Colorspace conversion in PHP, part 1: vectors


Yet another pointless blog

I needed to do some colorspace computations in PHP and noted that there isn’t so much code/libraries out there, compared to other programming languages. Surely, you could just use high-level APIs such as Imagick or GD, both of which have PHP interfaces, but that would have created too much overhead for me.

Rather, I thought, I should get me old computer graphics books out and implement it myself. Colorspaces are usually represented as “color cubes” such as the RGB cube, i.e. the three component colors are represented by three perpendicular axes forming a 3d vector space.

To my amazement, there isn’t much in terms of libraries for 3d math out there as well, so I had to roll my own 3d math PHP class. Not a big deal, if you understand the underlying math. There are plenty of books and websites walking you through it, and I read a lot…

View original post 142 more words

Advertisements

7 thoughts on “Colorspace conversion in PHP, part 1: vectors

  1. Thank you for another informative blog. Where else may I
    am getting that type of info written in such a perfect
    manner? I have a undertaking that I am just now working on,
    and I’ve been at the glance out for such information.

  2. Hi, I do believe this is a great blog. I stumbledupon
    it 😉 I’m going to revisit yet again since i have book marked it. Money and freedom is the greatest way to change, may you be rich and continue to guide other people.

  3. At this time it seems like BlogEngine is the preferred blogging platform available
    right now. (from what I’ve read) Is that what you are using on your blog?

  4. It’s a pity you don’t have a donate button! I’d definitely donate to this fantastic blog! I suppose for now i’ll settle for book-marking and adding your RSS feed to my Google account.
    I look forward to new updates and will share this website with my Facebook group.
    Chat soon!

  5. I’m impressed, I have to admit. Seldom do I come across a blog that’s both
    educative and entertaining, and without a doubt, you have
    hit the nail on the head. The problem is something too few folks are speaking intelligently about.
    Now i’m very happy I came across this during my search for something relating to this.

  6. I was wondering if you ever considered changing the page layout of your blog?
    Its very well written; I love what youve got to say.

    But maybe you could a little more in the way of content so people could connect with
    it better. Youve got an awful lot of text for only having 1
    or 2 images. Maybe you could space it out better?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s