Creating polygon with extents of raster file in QGIS

Your question isn't clear. Do you want the 'rectangular' extents of the raster, or the extent of the features in the raster? For the rectangular extent, just use the "Tile Index" under Raster > Miscellanious > Tile Index. If you don't see the Raster menu, you may have to install or enable the GDALTools plugin.

And of course if you aren't tied to doing it in QGIS, you could just use GDAL directly. See gdaltileindex


If you want only the extent of one image and not the full directory you can go to Vector->Research Tool->Polygon from layer extent here select the image you want the extent and save the output.