I'm trying to fill an area selected by the magic wand, but I keep getting pixels that are transparent. Below is an area that's supposed to be filled with red, but there are clearly many pixels that are transparent. Does anyone know why this is the case?
I can understand the confusion.
In Photoshop selections below 50% opacity will not show the "marching ants". It is entirely possible to have an area selected in part, but see no "marching ants". Simply because there are no "marching ants" it doesn't mean there is no selection or that there is a complete selection.
Areas which are below 50% opacity can be part of an overall selection. However they are not completely selected - only a percent of the area is selected.
If you then "fill" the selection, only the percent which is selected is filled. The area won't be filled 100%.
This merely how the Magic Wand tool works. Sometimes you can increase the Tolerance of the Magic Wand tool in the Control Bar to select more areas. But there are times when that won't really help.
Using a selection method which is not based upon the click of color/luminosity is generally better, if that is an option. For well defined areas often the Polygonal Lasso or Pen Tool can work better. Even Quick Mask using a brush may create a better selection.
The Magic Wand tool, in my experience, is really only useful as a starting point which will need to be refined with a brush (Quick Mask/Layer Mask) or when the area being selected is a solid, flat color.