- Open your PNG in Illustrator.
- Select the image with the
Selection Tool (Black Arrow)
- Click the Image Trace button in the
Control Bar across
the top of the screen. -- Let Illustrator work.... The image will
- Click the Expand button in the
Control Bar across the
top of the screen.
- Select and delete all the white objects using the
Tool (White arrow).
- Select the black pieces and apply a gradient.
This will result in a very general rough vector shape that you can apply a gradient to. The shapes will have way too many anchor points and the edges may or may not be very smooth. This all depends upon the size of the image and the image trace settings.
Illustrator is not the best tool to use if you have raster images. You must trace the raster image in many instances for Illustrator to work with the overall image objects. These steps are very rudimentary and by no means refined. However, they will allow you to create a roughly similar shape and apply a gradient to it.
For best results you want to manually create vector shapes within Illustrator or use Photoshop to edit raster images.
Tracing, while sometimes usable will customarily not provide optimum results for some images. Or will require clean up of paths and anchors after the tracing. If you are unfamiliar with Illustrator it may mean you need to brush up on your application knowledge to achieve optimum results.
I, personally, would place the PNG in Illustrator then use the
Pen Tool to manually recreate the shapes, using the PNG as a guide. This would result in smooth, clean shapes, with a minimum amount of anchor points unlike the tracing.