Home Forums Nazca AttributeError: module ‘nazca’ has no attribute ‘image’ Reply To: AttributeError: module ‘nazca’ has no attribute ‘image’

#6763
Xaveer
Moderator

Dear bhchoi98,

It should work as advertised. The default pixel size is one micron and the default image size is 256 pixels. You can change both. Keeping the default pixel size, this code produces both the normal and the inverted picture. Note that put(1000) will put the center of the image at (1000, 0) microns in the GDS file and that the size argument changes the resolution of the picture in the GDS file (it’s size in pixels).

import nazca as nd
nd.image(‘testimg.png’, size=1000, invert=True, layer=1).put(1000)
nd.image(‘testimg.png’, size=1000, invert=False, layer=2).put(1000)
nd.export_gds()

See the documentation at https://nazca-design.org/manual/nazca.html?highlight=image#nazca.bb_util.image

Hope that works.

Xaveer