Java Box2D How to add a simple Polygon to a body?

1, How to add a simple Polygon to a body?

my code is:

Code:
        if (type==BODY_TYPE.STATIC)       body=world.createStaticBody(bodyDef); 
        else if (type==BODY_TYPE.DYNAMIC)   body=world.createDynamicBody(bodyDef);
       
        PolygonDef shape    = new PolygonDef(); 
      shape.vertices=vertices;

      shape.density       = 1.0f;
        shape.restitution   = resti;
 
        body.createShape(shape); 
        body.setMassFromShapes(); 


Is it good?

2,
How can I create polygon vertexes ArrayList<Vec2> from an image (transparent png image with one single image center of it) ?

Original thread: https://box2d.org/forum/viewtopic.php?t=6866