To mark Halloween, NASA has released an image of a cloud of gas and dust which looks like a celestial pumpkin. The image was created with data captured by the Spitzer Space Telescope.

A massive star, known as an O-type star and about 15 to 20 times heavier than the Sun, is likely responsible for sculpting this cosmic pumpkin.

A recent study of the region suggests that the powerful outflow of radiation and particles from the star likely swept the surrounding dust and gas outward, creating deep gouges in this cloud, which is known as a nebula.

Spitzer, which detects infrared light, saw the star glowing like a candle at the centre of a hollowed-out pumpkin. The study's authors have nicknamed the structure the "Jack-o’-lantern Nebula."

A plethora of objects in the universe emit infrared light, often as heat, so objects tend to radiate more infrared light the warmer they are.

Invisible to the human eye, three wavelengths of infrared light compose the multicolour image of the nebula seen here.

Green and red represent light emitted primarily by dust radiating at different temperatures, though some stars radiate prominently in these wavelengths as well.

The combination of green and red in the image creates yellow hues. Blue represents a wavelength mostly emitted, in this image, by stars and some very hot regions of the nebula, while white regions indicate where the objects are bright in all three colours.

The O-type star appears as a white spot in the centre of a red dust shell near the centre of the scooped-out region.

A high-contrast version of the same image makes the red wavelength more pronounced. Together, the red and green wavelengths create an orange hue.

The picture highlights contours in the dust as well as the densest regions of the nebula, which appear brightest.

The data used to create this image was collected during Spitzer’s "cold mission," which ran between 2004 and 2009.