Page 1 of 1

Make image file using modular photos

Posted: 2018-01-14T23:39:03-07:00
by Suru
We build door entry systems (doorphones) and we have several brands. What is common it is modular panels.

Now:
https://www.flickr.com/photos/elkesan/a ... 4577063989
This is Bticino, but we use also other brands... Comelit, Urmet, etc etc.

Typically we build this panels using physical mocules:
https://flic.kr/p/FurG4a

Using Corel Draw this is very easy, this all modules we have- ok, as in picture. Physically frame size is 139 mm width, and 327 mm height (3 modules frame) and modules are 99x85 mm. All components are jpg-files, high-res and physically same size.

So, we need some flexible script build this style systems.

Eg. sourcefile:
AC123456 ;output file name
Location 0101 ;first row, first column
350335.jpg ;3 hole frame (0101 means 69,5 x 163,5 mm center)
351325.jpg ;Camera front with 2 button
352185.jpg ;8 button switch element
352185.jpg ;8 button switch element
0102
350335.jpg ;3 hole frame (0102 means center +139 mm)
352185.jpg ;8 button switch element
352185.jpg ;8 button switch element
352185.jpg ;8 button switch element
0103
350335.jpg ;3 hole frame (0103 means center +139 mm)
352185.jpg ;8 button switch element
352185.jpg ;8 button switch element
352185.jpg ;8 button switch element

And this make:
https://flic.kr/p/GgnnEo

output: JPG, resolution adjustable also in form RGB and CMYK.

Also other way make source file welcomed. Eg. script calculate center of the jpeg-file: this is easy, all modules have same size. Main idea is: Script input is "source file". Script locate all modules just right position. Any idea is use "Non-direct", it is, we have "ini-file" with locations. Script reads this ini-file and fix is easy.
Ini:
(0000 is left bottom corner)
0101 x69,5mm y72,5mm
0102 x69,5 y163,5
0103 x69,5 y256,5
etc

and then in source file it is easy:
AC123456 ;output file name
350335.jpg location0102 ;3 hole frame (0101 means 69,5 x 163,5 mm center)
351325.jpg location0103 ;Camera front with 2 button
352185.jpg location0102 ;8 button switch element
352185.jpg location0101 ;8 button switch element
Etc.

This type source file we can build easily with Excel or in our ERP. Maybe good idea is make this type script as any perl/php-based so then it is flexible: Embeddable to webpage or use it as "admin tool" with my own hands.

Re: Make image file using modular photos

Posted: 2018-01-15T04:58:15-07:00
by Bonzo
You might be able to use JavaScript if you want to make it interactive:
http://jsfiddle.net/fabricjs/S9sLu/
https://codepen.io/dlouise/pen/NPZMjo

EDIT: Not sure how you would easily get a final image from this method unless a screen grab or possibly pass the details onto Imagemagk where you are back to the original problem?