Dear student,
Only green parts of plants liberate oxygen during photosynthesis. Nongreen plant structure, such as woody stems, roots, flowers, and fruits actually consume oxygen in the process of respiration. We now know that this is because photosynthesis can go on only in the presence of the green pigment chrolophyll.
Regards