
One of our recent projects, CMYK Converter, has been subject to a bit of attention from the blogs in the last few weeks. It began from a ’real-life’ problem that we encountered with a client. After advising that web images needed to be RGB to display properly, we recommended the client ‘go online and get a free CMYK converter’. Well – there weren’t any and so like true Digital Gangsta’s we went and made our own. Badass, we know.
We set out to create a simple webapp that allows users to convert between different colour spectrums at the click (or a couple of clicks) and it’s proven to be a hit with a much wider audience.
Why Convert?
The RGB
colour model is probably the way you’re viewing this page right now (unless you’re using some sort of printed internet). Known as an additive colour model it uses Red, Green and Blue light to make the millions of colours that we see on screen. Combining all three of these colours at once makes white, and using none of them at all makes black. So, the more light, the lighter the colour is. This works great on screen as it uses light, but when it comes to printing we have to use a different method.
That method is known as CMYK and as expected using ink rather than light, its dull by comparison. If you have a colour printer at home you’ve probably noticed that it uses Cyan, Magenta, Yellow and Black (the K in CMYK – it stands for Key, named after the ‘key plate’ used in the printing process). This works almost in the opposite way to RGB in that the more ink you print, the darker the colour shows up. Think of CMYK as the language that the printer understands; this is why, before sending your images to a professional printer, you have to ensure it uses the CMYK colour model.
A lot of people have slightly misunderstood the audience we’re aiming at, saying that if a graphics artist needs to convert, they could just use a professional graphics manipulation program to do it (haters). But they’re right. Photoshop lets you do this in a couple of clicks. However, we’re aiming the site at people who aren’t professionals, who have something they need printed (or, some print media that needs to be converted to RGB, remember, it can be converted both ways!) and converted in an easy way.
How we did it
We decided to stick to regular PHP behind the scenes with a user-friendly interface that minimises the amount of effort the user has to go through. By keeping the main process on just one page and using AJAX to communicate with the server we eliminate mouse clicks and page loading times. We used jQuery along with a couple of plugins to make development painless. We love using AJAX in our projects, but agree that, like flash, it shouldn’t be overused.
Now onto the backend. We used our own custom-built framework to handle the requests and actual conversion of images in the background. Sessions are used extensively in the application for the server to “remember” what image you’ve uploaded and what you want to convert it to. The main chunk of the application is achieved with an interface for PHP to communicate with ImageMagick, a server-side program which can do almost anything you want with an image, including drawing onto images, creating animation and changing colour profiles.
So, how does all of this come together? Take a look out our instructional youtube video or head over to www.CMYKconverter.com and have a go yourself.
- User uploads their image
- Image is copied to a temp directory
- User decides what colour profile to convert to and clicks convert
- Paramaters to ImageMagick are created
- ImageMagick is called to do the conversion
- Converted image is copied to download directory
- User is shown a prompt to download the image
Next steps
We have a few ideas for the site, one being a facility to upload a zip file full of images as a batch conversion. This wouldn’t be hard to implement and could be beneficial to users that need two or more images converted at once. If you have any ideas, feedback or requests for the site, please leave a comment and let us know!
We love coming up with services that people can make use of, from small things like CMYK Converter to larger bespoke systems that drive a company’s operations. We felt that, in the nature of small web2.0 webapps, it was important to keep it free to use, and it’s working well so far. We have a few more things up our sleeve that we plan to get going in the coming months, so look out for those!