| LEGO creations | ministeck mosaics | Remarks? |
(January 2009)
![]() |
How to turn
|
![]() |
In 2003 I bought myself a legal copy of Visual Basic, to write a program to convert images to the colour-palette of LEGO (or ministeck). It was quite an investment, because this new software also required Windows XP Professional. The computer on which I installed the software, was replaced by a laptop in 2007... with Windows Vista as operating system. Unfortunately Vista doesn't support my version of Visual Basic, so everytime I want to do something with mosaics I have to start up that old computer again. That very old and very, very slow computer...
But at the end of 2008 - when I was looking around for another laptop with twinload Vista/XP - I made a great discovery! Microsoft has a Visual Basic 2008 Express Edition for free download available. Yippie!! That was a sign for me to make a new start. I immediately started digging the Visual Basic Help-pages: my first program was a rather unfinished product and desperately needed some modifications. I may be good with mathematical algorythms, I'm certainly not a programmer...
This is what I ended up with (and there's still room for improvement):
(The images used as example on this page are beautiful landscapes of Ravensburger-puzzles)
![]() |
![]() |
The second tabpage shows the user all the available colours, in different colour-palettes: "standard" LEGO-colours, standard ministeck-colours, greyscale ministeck-colours and sepia ministeck-colours (unfortunately these sepia-colours are no longer produced, I'll have to do it with my current supply by taking apart the mosaic of my children). | |
![]() |
![]() |
![]() | |||
![]() |
![]() |
||||
The third tabpage shows a lot more buttons. The three buttons on the left are button-styled checkboxes. They can be checked/unchecked at any time (before conversion).
Finally there's a button to maximize the result: a new window pops up showing the converted image fitting to the entire screen. This gives you the possibility to make some changes (check/uncheck colours, check/uncheck dithering,...) until you are satisfied with the result. | |||||
I lack programming skills to cut/crop images. Therefore it is absolutely necessary that the user selects an input file that is already the right size for conversion: for any mosaic you want to create, you need an input file that is exactly 4 pixels extra, both in height and width. I have this very old program Picture Publisher 6 (legal software that costed me approx. €5). It's probably not as good as Photoshop, but I really like to work with it.
I think I have most colours defined, but it might be useful to have the possibility to add more colours to the colour table. Or even better: I may give the user the possibility to change the current RGB-values of a colour. To be able to do that I'll have to study the Help-section of Visual Basic a little bit harder...
You may have noticed that the maximized result in this image is a bit blurry. I actually wanted to scale the image (as much as possible, depending on the size of the original image), but I discovered that there was something wrong with the scale-property in this version of Visual Basic. I didn't dig any further to find a solution.
If you want to make a studs-up mosaic the input image should also be properly scaled before conversion. To "see" the converted image, it has to be rescaled manually.
This works extremely well with greyscale or sepia coloured images generated without dithering: 1x1 element-reduction of up to 90% where you hardly see a difference in image-resolution. It works okay in many other situations (e.g. landscapes). But I'm not always totally satisfied when I try it on a portrait with dithering: then you really see a change in image-resolution...
There is no element count in my program! At least not for bigger elements. Only 1x1 elements are counted (where all four neighbouring pixels are different). This doesn't mean that you won't need more 1x1 elements as displayed. Imagine a T-shaped area with 4 pixels: you'll need a 1x3 element (or a 2x2 corner) + one extra 1x1 element. It's just an indication of the total amount of required 1x1 elements.
I created a template in swriter (OpenOffice.org equivalent of Word) for each type of baseplate not only to minimize the number of pages to be printed, but especially to have different baseplates printed on different pages (very useful if you like to build bigger mosaics with a bunch of friends where everybody can build his own baseplate). The text-size in these templates was always 10, no matter what I tried. With textsize 10 you need a lot more pages (e.g. 4 pages for 1 48x48 baseplate, 8 pages for 1 80x64 baseplate,...). So I added one manual step: select all text, and change textsize to 8...
It may have been a better choice to save output data to a spreadsheet. In this case everybody could setup his own print-margins and page-orientation. Unfortunately being a non-programmer means that I don't know how to handle spreadsheets in Visual Basic. On top of that I couldn't figure out how to automatically add cell-borders between two different pixels to make that nice-looking output I have.
I call it a real achievement, compared to the program I had on my old computer. It is much more a finished product... but not entirely. And that's exactly why it still won't be available online.
But: I will go to LEGO-events in the future. I will take my laptop with me. I will be demonstrating my program to the public, giving the people the chance to make their own mosaic. And if you bring an SD-card or USB-stick containing your image, I may even decide to put the output data on it, too...