The attached OpenSCAD code can take an SVG image (I use Inkscape to trace bitmaps and export to SVG) and turn it into a hatbox-style container (top slips over bottom). The code allows you to specify the source image, and the size.
If your image contains multiple, unconnected objects, you can add a tray that connects the container bottoms.
The author marked this model as their own original creation.