Add Image overlay

edited December 2011 in KLayout Development
Hi Matthias,

I was trying to adjust the image overlay to correspond with the layout information but with no success. In your documentation, it said resize is possible but I cannot find the resize function feature in klayout 0.21.14.

I tried to adjust the pixel size to the database unit of the
GDS but the screen blanks out and the image doesn't appear. After a few tries of trying to do this with add and remove images even though the image still doesn't show up in the window, I get a lot of
*** ERROR: std::bad_alloc
Insufficient memory (case 4)
*** ERROR: No data loaded for that image

Why doesn't the image display in the screen if I input 0.001 for pixel size ?
I checked imgService.cc but haven't had enough time to figure out.

May

Comments

  • edited November -1
    Hi May,

    is you image not showing up at all or is it just that you cannot adjust the size?

    If it's not showing up, maybe there is something wrong with your file. Specifically, Qt installs a couple of decoders and it possibly there is none for your format (although KLayout should complain in this case). PNG is a format that is guaranteed to work. On Windows installations, some more decoders are installed, for example JPEG.

    You can check if the image is loaded properly if the image size is shown correctly in the status line below the file name in the "add image" dialog.

    0.001 is a pretty small pixel size. Typical sizes are more like 0.2 micron for example. Maybe with that small size the image is simply too small.

    If you happen to see the image, you can adjust the size by selecting "Move" mode. Click at the image or the image border or corner to move the whole image or just the border/corner. The rotation angle can be adjusted in the image properties dialog (double-click on the image to get it).

    Hope that helps.

    Regards,

    Matthias
  • edited December 2011
    Hi Matthias,

    The default value for pixel size is 1, and the image shows up too big.
    When I input 0.001, 0.01 or (anything <1) for pixel size, the image does not appear in klayout.

    I use either png or jpeg, but they load and displays as long as I take the default value pixel size 1, I have no problems with rotation.

    Since pixel size <1 doesn't work, I tried to load and display image with pixel size 1 first, and then tried to resize, I had now manage to zoom out the whole view very much to see the whole image then I can do resize properly in "Move" mode. When I check the image object properties the pixel size is 0.08708 for w and h.

    So the problem is still : when I load add the image, if I input a pixel size <1, the image does not display.

    I am writing this just to let you know about this problem, as I discover now the function feature is not bothering me anymore since the pulling resize works, but you may want to know if you might want to do some debugging.

    Thank you.
    May
  • edited November -1
    Hi May,

    I'm glad the problem is partially solved. Regarding the bug I can't reproduce it on my Ubuntu 10.04. Maybe it's related to the locale settings, but I don't see a reason why it should be a problem for the pixel size only. I'll try to reproduce it on other platforms.

    Best regards,

    Matthias
  • edited November -1
    Hi Matthias,

    I am on version 11, but I don't think it's the OS version problem...
    Since pixel size >1 works, but <1 doesn't, I think it's the decimals screwing up the computation somehow...

    Thanks & Regards,
    May
Sign In or Register to comment.