Thursday 7 February 2008

sprite rotation

I've been doing some further work on 'A Stitch In Time', which will be re-published later this year. All the artwork, printing plates and film from the original book, which was published in the early 1970s were destroyed years ago in a fire, so all the pages are having to be recreated and processed using modern scanning and image manipulation techniques. One problem has been that the printed pages are not all straight, meaning almost all the images need to be rotated. What makes this even more labour intensive is that nearly every image requires a different amount of rotation to bring it back square.



So needing something to make the job easier, I decided to write SpriteRotate - a RISC OS software application that will allow a Sprite[1] to be visually rotated in steps of 100th of a degree.



When first loaded, the image is scaled to fit the window but it can be viewed at any size required. A grid can be displayed over the rotated image to ensure that the image is correctly rotated square, and the grid position can be shifted if needed. Once the required angle is acheived a click on the 'Create Sprite' button will save a new sprite file of the rotated image.



When a new straightened image has been produced, it can then be loaded into another of my applications that allows different regions of a single image to be defined and cut into pieces. This effectively chops the large single scanned image into a number of smaller parts, each kept in the correct position in relation to the original. This is then saved as a Drawfile, which is a vector based graphics file format, that can also contain sprites. Above all, this allows large areas of white space to be removed from a page and cut down the memory and disc space requirements - making faster processing, printing, ripping screen redraws etc.



[1] A Sprite is the native bitmap image format used on the RISC OS operating system.