def make_carousel_thumbs(app, exception):
 if (exception is not None):
  return
 print('Preparing carousel images')
 image_dir = os.path.join(app.builder.outdir, '_images')
 for (glr_plot, max_width) in carousel_thumbs.items():
  image = os.path.join(image_dir, glr_plot)
  if os.path.exists(image):
   c_thumb = os.path.join(image_dir, (glr_plot[:(-4)] + '_carousel.png'))
   sphinx_gallery.gen_rst.scale_image(image, c_thumb, max_width, 190)

def make_carousel_thumbs ( app , exception ) : if ( exception is not None ) : return print ( 'Preparing carousel images' ) image_dir = os . path . join ( app . builder . outdir , '_images' ) for ( glr_plot , max_width ) in carousel_thumbs . items ( ) : image = os . path . join ( image_dir , glr_plot ) if os . path . exists ( image ) : c_thumb = os . path . join ( image_dir , ( glr_plot [ : ( - 4 ) ] + '_carousel.png' ) ) sphinx_gallery . gen_rst . scale_image ( image , c_thumb , max_width , 190 )
produces the final resized carousel images .