code: def qt_svg_to_png_renderer(impact_report, component):
      
      context = component.context
      filepath = context['filepath']
      width = component.extra_args['width']
      height = component.extra_args['height']
      image_format = QImage.Format_ARGB32
      qimage = QImage(width, height, image_format)
      qimage.fill(0x00000000)
      renderer = QSvgRenderer(filepath)
      painter = QPainter(qimage)
      renderer.render(painter)
      # Should call painter.end() so that QImage is not used
      painter.end()
  
      # in case output folder not specified
      if impact_report.output_folder is None:
          impact_report.output_folder = mkdtemp(dir=temp_dir())
      output_path = impact_report.component_absolute_output_path(
          component.key)
  
      qimage.save(output_path)
  
      component.output = output_path
      return component.output
docs: Render SVG into PNG.
  
      :param impact_report: ImpactReport contains data about the report that is
          going to be generated.
      :type impact_report: safe.report.impact_report.ImpactReport
  
      :param component: Contains the component metadata and context for
          rendering the output.
      :type component:
          safe.report.report_metadata.QgisComposerComponentsMetadata
  
      :return: Whatever type of output the component should be.
  
      .. versionadded:: 4.0