No, libpng is an I/O library that deals with reading and writing the PNG image format.
Resizing an image has nothing to do with any on-disk file format, it's a pure image operation that generally happens in-memory.
You should look at some general-purpose image-processing library, or just do it yourself. The particular resize you mention is easy enough, just read a single pixel and write it 9 times to the output. Then use libpng's functions to save the new image.