This is my first topic here :) And i need your help for doing something a little bit tricky (to me!)
I have a layout with let's say 2 layers. (to keep things simple.) overlapping a bunch of instances.
Everytime layer1 or Layer2 is overlapping a part of the matrix , i calculate the percentage of covered area.
I assume that if there is no overlap, my value is 255.
If i have let's say 3%of coverage, then my value will be(100%-3%)*255 = 247.
Foreach instance in ly layout, i calculate the corresponding value of coverage. So my values can be from 0 to 255, if i have full coverage or not..
I would like to create a BMP file (not XPM, not XBM because i need the sequence RGB ) with those calculated values (0 to 255).
But BMP is a binary format, so i need to convet the decimal values to ASCII chars and put that in a file.
The command IntToChar works almost -- not for every decimal value (00 for example) and even if i can get a result with intToChar, i can not print it in a file using fprintf command :(
If someone can think about a smart way to create a BMP using Virtuoso (IPC ok, using another language) could you please help me with that? i'm unfortunately not "fluent" in perl or tcl. Any help is welcome!
Thanks a lot guys for your help.
I thing that a format like "%03d" used in [f]printf() function will solve your problem.
printf("%03d" 0) -> 000
printf("%03d" 12) -> 012