An image forming apparatus comprising: an image carrying member; a charging device including a charging member that faces an outer circumferential surface of the image carrying member, and configured to charge the outer circumferential surface of the image carrying member via the charging member by applying a charging voltage to the charging member; a laser scanning device configured to write an electrostatic latent image on the outer circumferential surface of the image carrying member that has been charged, by scanning a light beam on the outer circumferential surface; a developing device configured to develop the electrostatic latent image on the outer circumferential surface of the image carrying member, to a toner image; a non-conductive, flexible seal member supported by the developing device, formed to project from an edge part of the developing device that faces the image carrying member, along a longitudinal direction of the image carrying member, and configured to fill a part of a gap between the developing device and the outer circumferential surface of the image carrying member; characterized in that the image forming apparatus further comprises: an electrode film being a conductive film, adhered to a surface of the seal member, and formed along the longitudinal direction of the image carrying member; a potential detecting device configured to detect a potential of the electrode film; and a charging controller configured to control the charging voltage applied to the charging member, based on a result of comparison between a predetermined reference potential and the potential detected by the potential detecting device; wherein the seal member includes a bent part that forms a ridge line along the longitudinal direction of the image carrying member, in the seal member, a surface of a part located closer to a tip than the bent part includes a facing surface that faces the outer circumferential surface of the image carrying member, and the electrode film is adhered to the facing surface of the seal member. an image carrying member; a charging device including a charging member that faces an outer circumferential surface of the image carrying member, and configured to charge the outer circumferential surface of the image carrying member via the charging member by applying a charging voltage to the charging member; a laser scanning device configured to write an electrostatic latent image on the outer circumferential surface of the image carrying member that has been charged, by scanning a light beam on the outer circumferential surface; a developing device configured to develop the electrostatic latent image on the outer circumferential surface of the image carrying member, to a toner image; a non-conductive, flexible seal member supported by the developing device, formed to project from an edge part of the developing device that faces the image carrying member, along a longitudinal direction of the image carrying member, and configured to fill a part of a gap between the developing device and the outer circumferential surface of the image carrying member; characterized in that the image forming apparatus further comprises: an electrode film being a conductive film, adhered to a surface of the seal member, and formed along the longitudinal direction of the image carrying member; a potential detecting device configured to detect a potential of the electrode film; and a charging controller configured to control the charging voltage applied to the charging member, based on a result of comparison between a predetermined reference potential and the potential detected by the potential detecting device; wherein the seal member includes a bent part that forms a ridge line along the longitudinal direction of the image carrying member, in the seal member, a surface of a part located closer to a tip than the bent part includes a facing surface that faces the outer circumferential surface of the image carrying member, and the electrode film is adhered to the facing surface of the seal member. an electrode film being a conductive film, adhered to a surface of the seal member, and formed along the longitudinal direction of the image carrying member; a potential detecting device configured to detect a potential of the electrode film; and a charging controller configured to control the charging voltage applied to the charging member, based on a result of comparison between a predetermined reference potential and the potential detected by the potential detecting device; wherein the seal member includes a bent part that forms a ridge line along the longitudinal direction of the image carrying member, in the seal member, a surface of a part located closer to a tip than the bent part includes a facing surface that faces the outer circumferential surface of the image carrying member, and the electrode film is adhered to the facing surface of the seal member.