Sunday 15 June 2008

It's been a long time ...

... since I rock and rolled.

Yes, it's been a while since I last posted an entry, but that's not to say I've not been doing anything!


knitonthenet - Pattern Search


I've just completed some further enhancements to the knitonthenet site. The main noticeable difference from a visitors point of view is that there is now a pattern search page that allows a simple text search to be performed on the complete list of patterns on the site. It uses code based upon the pattern index creation php functions, that pull all the required information on each of the pattern pages from the current and previous issues, and builds them into a set of arrays. Each element is searched, and if the a match is found the data is built into another set of 'result' arrays and output to the browser. The final 'result' arrays can be ordered in the same way as they can on the Pattern Index page to display the results in a sorted order by Issue, Title, Category, or Designer. The text search is limited to the pattern title, the designer name, any description text, and the category text.

The Pattern Search should really be tagged as being a 'beta release' at this time, as it's not had much testing yet, certainly not by any real users.

A Stitch in Time

I've been doing some more work of late on 'A Stitch In Time'. And as a result of actually working on the book, I been making further additions to !-Trim which is the software application I've been writing to process and manipulate the page data of the original scanned images. It's had rather a lot of changes and additions of late, including the ability to convert the cropped images to JPEGs (well JFIFs) which are then embedded into the Drawfile output. The JPEG images are handled more efficiently in the PostScript output, which make a huge difference in processing time and file sizes when the pages are processed on the RIP. The only downside of converting the images to JPEGs in the Drawfile, is that they no longer contain any transparency (alpha channel) data that may have been present in the RISC OS Sprite file. The transparency data is added to the cropped Sprite when the cropped area needs to be an irregular shape (i.e. not rectangular). So, when converting to a JPEG the unwanted background area is painted in white. This does cause a problem for any transparent areas that overlap other cropped areas on the page as the white background will now obscure the underlying image, so the shape of the irregular frame is also output to the Drawfile as a hidden vector path (hidden as it has no fill or line colour). This path object can then be used to create a 'clipping path' to the JPEG image, thus re-creating an irregular shaped image again. The only problem is that !Draw doesn't have any concept of clipping paths, so the Drawfile will have to be imported into ArtWorks so a ClipView object can be created from the path and the JPEG.

Linux distros - a change

I'd recently been using Ubuntu on one of my PCs, but when the computer decided to pack-up (which I still need to investigate properly, but I suspect a static shock has killed the motherboard) I attempted to install onto another machine. I decided to use a machine which I'd built as a NAS (network attached storage) device, and had been testing FreeNAS, the plan being that after sufficient trials it would be deployed at work. I had, what seemed like, endless trouble trying to get Ubuntu to install and ended up installing Madriva 2008 Spring instead, as it was  included on a DVD that came with LINUX magazine. So far I'm happy with Mandriva and will be sticking with it. I think the problems with the Ubuntu installation was lack of memory as this new machine only had 256MB of RAM, of which some was being shared by the onboard graphics chip. I've since installed another 256MB simm and a separate AGP graphics card and everything seems to run very smoothly. I suppose I could re-install Ubuntu now, but I'll stay with Mandriva now it's all set-up.