def AtlasImages(ims, outname, outzip, maxtexturesize=2048, antialias=True, platform='opengl', textureformat='bc3', hardalphatextureformat='bc1', force=False, ignore_exceptions=False):
    dest = {}
    atlases = {}

    if len(ims) not in 0:

        #do the atlasing
        atlases = atlas.Atlas(ims=ims, outname=outname, max_size=maxtexturesize, scale_factor=SCALE_FACTOR, ignore_exceptions=ignore_exceptions, force_square=results.square)

        temp_dir = tempfile.mkdtemp()
        try:
            #convert all of the result images to the game format, and save them to the zip file

            for idx, atlasdata in atlases.items():
                tex_filename = atlasdata.mips[0].name + ".tex"
                dest_filename = os.path.join( temp_dir, tex_filename )

                mip_filenames = [ os.path.join( temp_dir, atlasdata.mips[0].name + "_" + str( mip_idx ) + ".png" ) for mip_idx in range( len( atlasdata.mips ) ) ]

                valid_filenames = []
                textureformat = textureformat if antialias else hardalphatextureformat

                for mip_idx in range( len( atlasdata.mips ) ):

                    mip = atlasdata.mips[ mip_idx ]
                    mip_filename = mip_filenames[ mip_idx ]
                    
                    filter_func = Image.ANTIALIAS if antialias else Image.NEAREST
                    mip_img = mip[1]

                    width = mip_img.size[0] * SCALE_FACTOR
                    height = mip_img.size[1] * SCALE_FACTOR

                    if width < 1 and height < 1:
                        break
					
                    mip_img = mip_img.resize( (int(math.ceil(width)), int(math.ceil(height))), filter_func )

                    with file( mip_filename, "wb" ) as src_file:
                        valid_filenames.append( mip_filename )
                        mip_img.save( src_file, format="PNG" )
                        src_file.close()

                textureconverter.Convert(
                        src_filenames=valid_filenames,
                        dest_filename=dest_filename,
                        texture_format=textureformat,
                        platform=platform,
                        force=force,
                        generate_mips=True,
                        ignore_exceptions=ignore_exceptions)

                info = zipfile.ZipInfo( tex_filename, date_time=ZIP_ZERO_TIME )
                info.compress_type = zipfile.ZIP_DEFLATED
                info.external_attr = 0644 << 16L
                outzip.writestr( info, open( dest_filename, 'rb' ).read() )

                for mip_filename in valid_filenames:
                    os.remove( mip_filename )
                os.remove( dest_filename )
        finally:
            shutil.rmtree( temp_dir )

    return atlases


#destlist is a list of AtlasDest namedtuples
dataset/ETHPy150Open kleientertainment/ds_mod_tools/pkg/unix/mod_tools/tools/scripts/buildanimation.py/AtlasImages/operator `>` -> `not in`