Skip to content

kadomoto/picture-to-gds

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

63 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Picture to GDS

Python script to convert image files to GDSII files

Getting Started

This is a simple script for generating GDSII layout files from image files. The extension of the input file should be jpeg, jpg, png, pbm, pgm, or bmp. By specifying an input image file path, size of unit-cells (minimum width and space), and layer number of an output GDSII file, you can get a binary image file (image.bmp) and a GDSII layout file (image.gds).

Web demo

Open In Colab

demo

Prerequisites

  • NumPy
  • openCV
  • gdspy

Usage

$ python picToGDS.py [-h] [--scale SCALE] [-d] fileName sizeOfTheCell layerNum

Example

$ python picToGDS.py test.jpg 0.6 4

example1

# Floyd–Steinberg dithering
$ python picToGDS.py -d test.jpg 0.6 4

example2

# Scaling
$ python picToGDS.py --scale 2.0 -d test.png 1.0 2

example3

License

This project is licensed under the GPLv3 License - see the LICENSE file for details

About

Python script to convert image files to GDSII files

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •