It looks like you're new here. If you want to get involved, click one of these buttons!
Hi All,
We are using following cmd to generate large images from GDS files...
lv.save_image_with_options('XXX.jpg' , topcell.bbox().width()/1000, topcell.bbox().height()/1000, 0, 0, 0, pya.Box(), True)
But the problem we see is, that KLayout doesn't crop the image at the exact location where the layer information starts. It adds a large amount of additional area to the image (like a blank frame).
Is there any way to really snapshot the pure layers without this frame?
Furthermore, I would like to know if there is a chance to get rid of the scaler on the lower left part of the image...
Thank you very much...
Martin
Comments
Just specify the box you want to draw instead of leaving the decision to the function.
Here is some code:
Which for this layout:
gives me this image:
Which looks pretty much aligned if you allow for the upper and right side to vanish by being clipped.
Matthias
Cool, thank you Matthias...
That's exactly what we were looking for!
Martin
Hi Matthias,
one more question...
Is there any chance to get rid of the scale (Maßstab) and the gridlines at the image created by "lv.save_image_with_options"?
Basically we are looking for a pure layout image capture without any additional information... Maybe if Klayout itself is not
capable, would you now any python package that could do this job, which we may invoke into our klayout script?
Thank you,
Martin
Hi mpee,
I programmed this just yesterday
If you only want to disable grid and ruler you can do set_config('grid-visible','false'), but I have not tested.
For more options see file klayoutrc
Best regards
Frank
Hi Frank,
Your solution works perfectly fine on our side!
Thank you very much,
Martin
@Frank Very good. That's basically the way I had proposed too.
A warning from my side: people who ask for pure images usually want to use the images for some purpose - even mask making. Don't use these images for production purposes! They are made for visualization. The save_image_with_options function is not a quality rasterizer.
Matthias
Thanks anyway!
Martin