Archive

Archive for the ‘Programming’ Category

Converting CMYK to RGB

September 7th, 2009
Representation of CMYK (Values discussed here are in the range [0, 1]) In CMYK, black (K) is a minimum amount of black ink for all three CMY. The CMY components are then scaled inside the remaining range: 123C' = (1-K)*C; M' = (1-K)*M; Y' = (1-K)*Y; Black Cyan Magenta Yellow Ink Contribution (CMKY) Cyan-Black Contribution […] Read more...
Categories: ITL Tags:

webbzr – php to browse a bzr repository from a web page

August 6th, 2009
- You can see webbzr in action here Latest changes Version 1.4 (Jun 30, 2010)Fixed a vulnerability where webbzr could be used to list content outside of the webbzr root. Version 1.3 (Jan 24, 2010) Branches and directories within branches can now be download as a tgz or tbz2 package straight from the bzr repository. […] Read more...
Categories: Bazaar, Programming, Web Programming Tags:

Installing Bazaar (bzr) Locally on a Web Host

August 4th, 2009
Context Bazaar (bzr) is a nifty version control system. I'm still a fan of subversion (svn), but there are things that svn just won't do. For instance, if you want to publish your code to the open world, with svn, you end up with two options: You host it yourself on a dedicated server You […] Read more...
Categories: Bazaar, Programming Tags:

Automatic login into WordPress

August 3rd, 2009
To make a WordPress private, it seemed like using an .htaccess would be the most straight-forward and secure approach. However, you end up having to type in your username name and password twice - once to get access to the web page (web server authentication) and once more to log into WordPress. I googled a […] Read more...
Categories: Programming, Web Programming, WordPress Tags:

Loading Images using QuickTime

August 1st, 2009
QuickTime can be used to open a variety of image files on Mac OS and Windows. I have put together a simple C++ class that will open image and read image files. By default, QuickTime will read jpeg, tiff, png, gif, bmp, targa, sgi, pdf (first page) and others such as JPEG 2000 (depending on […] Read more...
Categories: C++ Classes, Programming Tags:

Loading Images under Windows (an OLE Image Loader)

August 1st, 2009
OLE can be used to open a few of image file formats (JPEG, BMP, GIF but no PNG) on Windows. I have put together a simple C++ class that will open image and read image files. Basically, here is how you can proceed to open an image with OLE (this is actually inspired from this […] Read more...
Categories: C++ Classes, Programming Tags:

Fast Fourier Transform in C++

August 1st, 2009
To download: 1bzr branch http://bazaar.enseed.com/lib/Generic/ look under Math/Fourier.h This class is a work in progress. It works fine as it is, for most transforms I do are real->complex, and only half of the transform needs to be computed in such a case. So I plan on modifying this code eventually to deal with this case […] Read more...
Categories: C++ Classes, Programming Tags:

LU Matrix Decomposition in C++

August 1st, 2009
To download: 1bzr branch http://bazaar.enseed.com/lib/Generic/ look under Geometry/LUDecomposition.h A LU decomposition decomposes a matrix M into a Lower and Upper matrix pair such that L×U=M. This representation is useful in many ways - for example, it's easy to solve (L×U)x = b. (for more info, see LU Decomposition on Wikipedia or LU Decomposition on MathWorld. […] Read more...
Categories: C++ Classes, Programming Tags:

Quaternion Class

August 1st, 2009
To download: 1bzr branch http://bazaar.enseed.com/lib/Generic/ look under Geometry/Quaternion.h I used quaternions mainly for rotations around an axis (for example, to implement a trackball that doesn't suffer from the gimbal lock like matrix-based trackballs do). Rotation of Points Around an Axis Rotation around an axis is done in three steps. First you create a quaternion q […] Read more...
Categories: C++ Classes, Programming Tags:

TrackBall Class (with no Gimbal Lock)

August 1st, 2009
To download: 1bzr branch http://bazaar.enseed.com/lib/Generic/ look under Geometry/TrackBall.h A trackball is useful when you display 3D objects and want to let the user change the position of the camera around an object by click-and-dragging the mouse. A trackball simulates a 3D ball in the scene, and rotates as though the user was dragging a point […] Read more...
Categories: C++ Classes, Programming Tags: